Skip to content

Implement unhandled rejection tracking

Implement unhandled rejection tracking for promises as specified in https://gist.github.com/benjamingr/0237932cee84712951a2

Fixes #256 (closed)

Note that I did not implement any default action - so errors are still swallowed by default and many developers are therefore not going to discover the hooks. My recommendation would be by default to log the error as "Potentially unhandled: " + error.stack (and for example "no stack trace" for non-errors).

These hooks are enough to implement any kind of error handling scheme, including log-on-gc (needs native module I think).

@domenic , @rvagg , @vkurchatkin , @benjamingr ,@bnoordhuis

Merge request reports

Loading