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 166210 4196008456101facd333b536053918ec211e2c6a
parent 166209 2c93630e3109e1337f0674da8bed4d9b839df5b4
child 166211 4ec6e8c7c2ceaa19dc8cfcb1708971c0ae4c37cf
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersYoric
bugs926635
milestone27.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 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);