From bcc7452d6ff27ce6a806901eef48d3316fdc277c Mon Sep 17 00:00:00 2001 From: Alexandre Poirot Date: Wed, 31 May 2023 21:09:02 +0000 Subject: [PATCH] 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 --- testing/talos/talos/tests/devtools/addon/content/damp.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/talos/talos/tests/devtools/addon/content/damp.js b/testing/talos/talos/tests/devtools/addon/content/damp.js index 1645922ba1a0..412eaced01c7 100644 --- a/testing/talos/talos/tests/devtools/addon/content/damp.js +++ b/testing/talos/talos/tests/devtools/addon/content/damp.js @@ -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