зеркало из https://github.com/mozilla/gecko-dev.git
geckodriver: Update what properties are read from errors from Marionette server
Source-Repo: https://github.com/mozilla/geckodriver Source-Revision: 937cd591139c85cd4b35bb8ee0d42439838ba519 --HG-- extra : rebase_source : d7c085dd6c233eb0aff0471e3bd0be25b16f6dff
This commit is contained in:
Родитель
1e289df772
Коммит
272213c60f
|
@ -858,7 +858,7 @@ impl MarionetteError {
|
|||
"Expected an error object"));
|
||||
}
|
||||
let status = try_opt!(
|
||||
try_opt!(data.find("status"),
|
||||
try_opt!(data.find("error"),
|
||||
ErrorStatus::UnknownError,
|
||||
"Error value has no status").as_string(),
|
||||
ErrorStatus::UnknownError,
|
||||
|
@ -872,10 +872,10 @@ impl MarionetteError {
|
|||
"Error messsage was not a string").into();
|
||||
|
||||
let stacktrace = match data.find("stacktrace") {
|
||||
None | Some(&Json::Null) => None,
|
||||
Some(x) => Some(try_opt!(x.as_string(),
|
||||
ErrorStatus::UnknownError,
|
||||
"Error messsage was not a string").into()),
|
||||
None => None
|
||||
};
|
||||
Ok(MarionetteError::new(status, message, stacktrace))
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче