Bug 926635 - Improve layout of uncaught Promise.jsm error messages. r=Yoric
authorTareq Khandaker <tareqakhandaker@gmail.com>
Sun, 27 Oct 2013 08:03:51 -0400
changeset 152372 4196008456101facd333b536053918ec211e2c6a
parent 152371 2c93630e3109e1337f0674da8bed4d9b839df5b4
child 152396 4ec6e8c7c2ceaa19dc8cfcb1708971c0ae4c37cf
push id3237
push userryanvm@gmail.com
push dateSun, 27 Oct 2013 12:04:57 +0000
treeherderfx-team@419600845610 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersYoric
bugs926635
milestone27.0a1
Bug 926635 - Improve layout of uncaught Promise.jsm error messages. r=Yoric
toolkit/modules/Promise.jsm
--- a/toolkit/modules/Promise.jsm
+++ b/toolkit/modules/Promise.jsm
@@ -215,21 +215,21 @@ Services.obs.addObserver(function observ
     dump("On: " + date + "\n");
     dump("Full message: " + message + "\n");
     dump("See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise\n");
     dump("Full stack: " + (stack||"not available") + "\n");
     dump("*************************\n");
     return;
   }
   if (stack) {
-    message += " at " + stack;
+    message += "\nFull Stack: " + stack;
   }
   error.init(
-             /*message*/"A promise chain failed to handle a rejection: on " +
-               date + ", " + message,
+             /*message*/"A promise chain failed to handle a rejection.\n\n" +
+             "Date: " + date + "\nFull Message: " + message,
              /*sourceName*/ fileName,
              /*sourceLine*/ lineNumber?("" + lineNumber):0,
              /*lineNumber*/ lineNumber || 0,
              /*columnNumber*/ 0,
              /*flags*/ Ci.nsIScriptError.errorFlag,
              /*category*/ "chrome javascript");
   Services.console.logMessage(error);
 }, "promise-finalization-witness", false);