bug 1523104: remote: propagate underlying cause to superclass; r=ochameau
authorAndreas Tolfsen <ato@sny.no>
Wed, 27 Feb 2019 19:06:20 +0000
changeset 521113 8a8c0dcb9486
parent 521112 11a98da764d1
child 521114 2bb69a9505ba
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1523104
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1523104: remote: propagate underlying cause to superclass; r=ochameau
remote/Error.jsm
--- a/remote/Error.jsm
+++ b/remote/Error.jsm
@@ -14,16 +14,17 @@ var EXPORTED_SYMBOLS = [
 const {Log} = ChromeUtils.import("chrome://remote/content/Log.jsm");
 const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "log", Log.get);
 
 class RemoteAgentError extends Error {
   constructor(message = "", cause = undefined) {
+    cause = cause || message;
     super(cause);
 
     this.name = this.constructor.name;
     this.message = message;
     this.cause = cause;
 
     this.notify();
   }