зеркало из https://github.com/mozilla/gecko-dev.git
Added code to EditorExecuteScript() that will
report the line number in the script where an exception is thrown.
This commit is contained in:
Родитель
69fb203755
Коммит
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче