Skip to content

Commit c94fc46

Browse files
committed
Include stack in browser uncaught error reporting
1 parent 9ea45e7 commit c94fc46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

browser-entry.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ process.removeListener = function(e, fn) {
5858

5959
process.on = function(e, fn) {
6060
if (e === 'uncaughtException') {
61-
global.onerror = function(err, url, line) {
62-
fn(new Error(err + ' (' + url + ':' + line + ')'));
61+
global.onerror = function(msg, url, line, col, err) {
62+
fn(err || new Error(msg + ' (' + url + ':' + line + ')'));
6363
return !mocha.allowUncaught;
6464
};
6565
uncaughtExceptionHandlers.push(fn);

0 commit comments

Comments
 (0)