mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 956568 - Display more meaningful error information when Parser.jsm is sad, r=past
This commit is contained in:
parent
960d7f5b31
commit
f0310e87d7
@ -2350,7 +2350,15 @@ let SyntaxTreeVisitor = {
|
||||
* The thrown exception.
|
||||
*/
|
||||
function log(aStr, aEx) {
|
||||
let msg = "Warning: " + aStr + ", " + aEx + "\n" + aEx.stack;
|
||||
let msg = "Warning: " + aStr + ", " + aEx.message;
|
||||
|
||||
if ("lineNumber" in aEx && "columnNumber" in aEx) {
|
||||
msg += ", line: " + aEx.lineNumber + ", column: " + aEx.columnNumber;
|
||||
}
|
||||
if ("stack" in aEx) {
|
||||
msg += "\n" + aEx.stack;
|
||||
}
|
||||
|
||||
Cu.reportError(msg);
|
||||
dump(msg + "\n");
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user