diff --git a/events/unhandledRejection.js b/events/unhandledRejection.js deleted file mode 100644 index 8bd7b4b..0000000 --- a/events/unhandledRejection.js +++ /dev/null @@ -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); - });