Delete unhandledRejection.js
This commit is contained in:
1 parent
4ed9a7b7f5
commit
e43a5fd5a3
1 file changed
-10
@@ -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);
|
||||
});
|
||||
Reference in new issue
Block a user