Added code to EditorExecuteScript() that will

report the line number in the script where
an exception is thrown.
This commit is contained in:
kin%netscape.com 1999-07-27 23:18:03 +00:00
Родитель 69fb203755
Коммит 5a4c170b72
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -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;