Skip to content

Instantly share code, notes, and snippets.

@othiym23
Created September 27, 2013 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save othiym23/6724661 to your computer and use it in GitHub Desktop.
Save othiym23/6724661 to your computer and use it in GitHub Desktop.
wrap(process, '_fatalException', function (_fatalException) {
return function asyncListenerErrorWrapper(er) {
var length = listeners.length;
for (var i = 0; i < length; ++i) {
var callbacks = listeners[i].callbacks;
if (callbacks.error && callbacks.error({}, er)) {
process._needTickCallback();
return true;
}
}
return _fatalException(er);
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment