Bug 1473418 - Improve exception message occuring during toolbox opening. r=jryans
MozReview-Commit-ID: HFXiyNzstGK
--- a/devtools/client/framework/toolbox.js
+++ b/devtools/client/framework/toolbox.js
@@ -571,17 +571,22 @@ Toolbox.prototype = {
// so we don't have to explicitly wait for this in tests; ideally, all tests
// will handle this on their own, but each have their own tear down function.
if (flags.testing) {
await performanceFrontConnection;
}
this.emit("ready");
this._resolveIsOpen();
- }.bind(this))().catch(console.error);
+ }.bind(this))().catch(e => {
+ console.error("Exception while opening the toolbox", String(e), e);
+ // While the exception stack is correctly printed in the Browser console when
+ // passing `e` to console.error, it is not on the stdout, so print it via dump.
+ dump(e.stack + "\n");
+ });
},
/**
* loading React modules when needed (to avoid performance penalties
* during Firefox start up time).
*/
get React() {
return this.browserRequire("devtools/client/shared/vendor/react");