Slightly better handling of exceptions, especially parse errors. Bug 388248, r=gavin

This commit is contained in:
bzbarsky@mit.edu 2007-07-15 17:21:11 -07:00
Родитель d4ba826d16
Коммит 3b4a283dec
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -63,14 +63,14 @@ Tester.prototype = {
var scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
getService(Ci.mozIJSSubScriptLoader);
scriptLoader.loadSubScript(this.currentTest.path, this.currentTest.scope);
// Run the test
var exception = null;
try {
scriptLoader.loadSubScript(this.currentTest.path, this.currentTest.scope);
// Run the test
this.currentTest.scope.test();
} catch (ex) {
this.currentTest.tests.push(new testResult(false, "Exception thrown", ex, false));
this.currentTest.scope.done = true;
}
// If the test ran synchronously, move to the next test,