Uncaught Exception and unhandled Rejection

This commit is contained in:
supositware 2022-06-17 07:32:23 +02:00
parent 52de74494d
commit 2c5dbdf038
2 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,6 @@
export default {
name: 'uncaughtException',
async execute(error) {
return console.error(`\x1b[31mUncaughtException: ${error}\x1b[37m`);
},
};

View file

@ -1,7 +1,6 @@
export default { export default {
name: 'unhandledRejection', name: 'unhandledRejection',
once: true,
async execute(error) { async execute(error) {
console.error('Unhandled promise rejection:', error); return console.error(`\x1b[31mUncaught Promise Rejection: ${error}\x1b[37m`);
}, },
}; };