Skip to content

Commit 35a5842

Browse files
johnjbartonJonathan Ginsburg
and
Jonathan Ginsburg
authoredDec 18, 2020
feat(server): print stack of unhandledrejections (#3593)
* feat(server): print stack of unhandledrejections The v8 engine includes the error with the stack and most of the time we need the stack also. Co-authored-by: Jonathan Ginsburg <jginsburgn@google.com>
1 parent 4a8178f commit 35a5842

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,12 @@ class Server extends KarmaEventEmitter {
417417
}
418418

419419
processWrapper.on('unhandledRejection', (error) => {
420-
this.log.error(`UnhandledRejection: ${error.message || String(error)}`)
420+
this.log.error(`UnhandledRejection: ${error.stack || error.message || String(error)}`)
421421
reportError(error)
422422
})
423423

424424
processWrapper.on('uncaughtException', (error) => {
425-
this.log.error(`UncaughtException:: ${error.message || String(error)}`)
425+
this.log.error(`UncaughtException: ${error.stack || error.message || String(error)}`)
426426
reportError(error)
427427
})
428428
}

0 commit comments

Comments
 (0)
Please sign in to comment.