forked from Supositware/Haha-Yes
Uncaught Exception and unhandled Rejection
This commit is contained in:
parent
52de74494d
commit
2c5dbdf038
2 changed files with 7 additions and 2 deletions
6
events/process/uncaughtException.js
Normal file
6
events/process/uncaughtException.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
export default {
|
||||
name: 'uncaughtException',
|
||||
async execute(error) {
|
||||
return console.error(`\x1b[31mUncaughtException: ${error}\x1b[37m`);
|
||||
},
|
||||
};
|
|
@ -1,7 +1,6 @@
|
|||
export default {
|
||||
name: 'unhandledRejection',
|
||||
once: true,
|
||||
async execute(error) {
|
||||
console.error('Unhandled promise rejection:', error);
|
||||
return console.error(`\x1b[31mUncaught Promise Rejection: ${error}\x1b[37m`);
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue