Bug 1836146 - [devtools] Improve exception message in DAMP. r=devtools-reviewers,perftest-reviewers,nchevobbe,afinder

We weren't printing the exception message.
Error mesage and its related stacktrace were also off.

Allow exception to be a string.

Differential Revision: https://phabricator.services.mozilla.com/D179459
This commit is contained in:
Alexandre Poirot 2023-05-31 21:09:02 +00:00
parent 373447e21c
commit bcc7452d6f

View File

@ -390,8 +390,9 @@ Damp.prototype = {
},
exception(e) {
this.error(e);
dump(e.stack + "\n");
const str =
"Exception: " + (e?.message || e) + "\n" + (e?.stack || "No stack");
this.error(str);
},
// Waits for any pending operations that may execute on Firefox startup and that