Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Bug 690154 - Broken JSON structure when test throws a global exceptio…
Browse files Browse the repository at this point in the history
…n. r=jhammel
  • Loading branch information
whimboo committed Sep 29, 2011
1 parent dccafce commit d99d21c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions mozmill/mozmill/extension/resource/modules/frame.js
Expand Up @@ -117,18 +117,21 @@ var loadFile = function(path, collector) {
}
try {
loader.loadSubScript(uri, module, "UTF-8");
} catch(e) {
events.fail(e);
} catch (e) {
events.fail({'exception' : e});

var obj = {
'filename':path,
'passed':false,
'failed':true,
'passes':0,
'fails' :1,
'name' :'Unknown Test',
'filename': path,
'passed': 0,
'failed': 1,
'passes': [ ],
'fails' : [{'exception' : {
message: e.message,
filename: e.filename,
lineNumber: e.lineNumber}}],
'name' : '<TOP_LEVEL>'
};
events.fireEvent('endTest', obj);
Components.utils.reportError(e);
}

module.__file__ = path;
Expand Down

0 comments on commit d99d21c

Please sign in to comment.