Skip to content

Commit

Permalink
change actual source file
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpg committed Aug 10, 2016
1 parent 1b23a96 commit 3179081
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 5 additions & 2 deletions browser-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ process.removeListener = function(e, fn){

process.on = function(e, fn){
if ('uncaughtException' == e) {
global.onerror = function(err, url, line){
fn(new Error(err + ' (' + url + ':' + line + ')'));
global.onerror = function(err, url, line, col, errObj){
if (!errObj) {
errObj = new Error(err + ' (' + url + ':' + line + ')');
}
fn(errObj);
return !mocha.allowUncaught;
};
uncaughtExceptionHandlers.push(fn);
Expand Down
7 changes: 2 additions & 5 deletions mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,8 @@ process.removeListener = function(e, fn){

process.on = function(e, fn){
if ('uncaughtException' == e) {
global.onerror = function(err, url, line, col, errObj){
if (!errObj) {
errObj = new Error(err + ' (' + url + ':' + line + ')');
}
fn(errObj);
global.onerror = function(err, url, line){
fn(new Error(err + ' (' + url + ':' + line + ')'));
return !mocha.allowUncaught;
};
uncaughtExceptionHandlers.push(fn);
Expand Down

0 comments on commit 3179081

Please sign in to comment.