зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1767042 - Improve the output of unexpected errors in `SimpleTest.js`. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D145107
This commit is contained in:
Родитель
fa75862271
Коммит
31113891df
|
@ -2100,9 +2100,16 @@ var add_task = (function() {
|
|||
}
|
||||
} catch (ex) {
|
||||
try {
|
||||
let serializedEx;
|
||||
if (ex instanceof Error) {
|
||||
serializedEx = `${ex}`;
|
||||
} else {
|
||||
serializedEx = JSON.stringify(ex);
|
||||
}
|
||||
|
||||
SimpleTest.record(
|
||||
false,
|
||||
"" + ex,
|
||||
serializedEx,
|
||||
"Should not throw any errors",
|
||||
ex.stack
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче