bug 1523104: remote: propagate underlying cause to superclass; r=ochameau
authorAndreas Tolfsen <ato@sny.no>
Wed, 27 Feb 2019 19:06:20 +0000
changeset 524111 8a8c0dcb9486f4ae38ad683c43de21210b4233a6
parent 524110 11a98da764d1f9f3c4640ae9393fe1880e2c28b3
child 524112 2bb69a9505ba13d1ffc45c13d4f0b14b4104343e
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [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();
   }