mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 13:21:28 +00:00
Added code to EditorExecuteScript() that will
report the line number in the script where an exception is thrown.
This commit is contained in:
parent
69fb203755
commit
5a4c170b72
@ -511,6 +511,8 @@ function EditorExecuteScript(fileSpec)
|
||||
var buf = { value:null };
|
||||
var tmpBuf = { value:null };
|
||||
var didTruncate = { value:false };
|
||||
var lineNum = 0;
|
||||
var ex;
|
||||
|
||||
// Log files can be quite huge, so read in a line
|
||||
// at a time and execute it:
|
||||
@ -537,7 +539,10 @@ function EditorExecuteScript(fileSpec)
|
||||
tmpBuf.value = null;
|
||||
}
|
||||
|
||||
eval(buf.value);
|
||||
++lineNum;
|
||||
|
||||
try { eval(buf.value); }
|
||||
catch(ex) { dump("Playback ERROR: Line " + lineNum + " " + ex + "\n"); }
|
||||
}
|
||||
|
||||
buf.value = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user