зеркало из https://github.com/mozilla/gecko-dev.git
Bug 721156 - aError.stack is undefined in the Error Console when exception is thrown in Scratchpad. r=robcee
This commit is contained in:
Родитель
b9fbed5629
Коммит
76651fbb1f
|
@ -487,7 +487,8 @@ var Scratchpad = {
|
|||
*/
|
||||
writeAsErrorComment: function SP_writeAsErrorComment(aError)
|
||||
{
|
||||
let newComment = "Exception: " + aError.message + "\n" + aError.stack.substring(0, aError.stack.length - 1);
|
||||
let stack = aError.stack || aError.fileName + ":" + aError.lineNumber;
|
||||
let newComment = "Exception: " + aError.message + "\n" + stack.replace(/\n$/, "");
|
||||
|
||||
this.writeAsComment(newComment);
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче