Skip to content

Commit

Permalink
Include stack in browser uncaught error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
prust committed Jun 11, 2019
1 parent 9ea45e7 commit c94fc46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions browser-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ process.removeListener = function(e, fn) {

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

0 comments on commit c94fc46

Please sign in to comment.