We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
common.crashOnUnhandledRejection
1 parent 2055fd3 commit dca0815Copy full SHA for dca0815
test/common.js
@@ -677,3 +677,9 @@ exports.getArrayBufferViews = function getArrayBufferViews(buf) {
677
}
678
return out;
679
};
680
+
681
+// Crash the process on unhandled rejections.
682
+exports.crashOnUnhandledRejection = function() {
683
+ process.on('unhandledRejection',
684
+ (err) => process.nextTick(() => { throw err; }));
685
+};
0 commit comments