diff --git a/events/process/uncaughtException.js b/events/process/uncaughtException.js new file mode 100644 index 0000000..9991c8e --- /dev/null +++ b/events/process/uncaughtException.js @@ -0,0 +1,6 @@ +export default { + name: 'uncaughtException', + async execute(error) { + return console.error(`\x1b[31mUncaughtException: ${error}\x1b[37m`); + }, +}; diff --git a/events/process/unhandledRejection.js b/events/process/unhandledRejection.js index 8f1d31b..19bc2ad 100644 --- a/events/process/unhandledRejection.js +++ b/events/process/unhandledRejection.js @@ -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`); }, };