Delete unhandledRejection.js

This commit is contained in:
ItzEmerald authored and GitHub committed 2020-12-10 11:34:01 +00:00
1 parent 4ed9a7b7f5
commit e43a5fd5a3
1 file changed
-10
-10
View File
@@ -1,10 +0,0 @@
process.on('unhandledRejection', error => {
// Will print "unhandledRejection err is not defined"
console.log('unhandledRejection', error.message);
});
new Promise((_, reject) => reject(new Error('woops'))).
catch(error => {
// Will not execute
console.log('caught', err.message);
});