From 2c5dbdf0387722fc4e47f76d2e6b0627f202f299 Mon Sep 17 00:00:00 2001
From: supositware <loic.bersier1@gmail.com>
Date: Fri, 17 Jun 2022 07:32:23 +0200
Subject: [PATCH] Uncaught Exception and unhandled Rejection

---
 events/process/uncaughtException.js  | 6 ++++++
 events/process/unhandledRejection.js | 3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)
 create mode 100644 events/process/uncaughtException.js

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`);
 	},
 };