-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module.exports = async () => { | ||
process.on("unhandledRejection", async (reason, promise) => { | ||
console.error("[Anticrash] | [UnhandledRejection_Logs] | [start] : ==============="); | ||
console.error("Unhandled Rejection at:", promise, "reason:", reason); | ||
console.error("[Anticrash] | [UnhandledRejection_Logs] | [end] : ==============="); | ||
}); | ||
|
||
process.on("uncaughtException", async (err, origin) => { | ||
console.error("[Anticrash] | [UncaughtException_Logs] | [Start] : ==============="); | ||
console.error(`Uncaught exception: ${err}\n` + `Exception origin: ${origin}`); | ||
console.error("[Anticrash] | [UncaughtException_Logs] | [End] : ==============="); | ||
}); | ||
|
||
process.on("uncaughtExceptionMonitor", async (err, origin) => { | ||
console.error("[Anticrash] | [UncaughtExceptionMonitor_Logs] | [Start] : ==============="); | ||
console.error(`Uncaught exception monitor: ${err}\n` + `Exception origin: ${origin}`); | ||
console.error("[Anticrash] | [UncaughtExceptionMonitor_Logs] | [End] : ==============="); | ||
}); | ||
|
||
console.log("[INFO] Anticrash events loaded"); | ||
}; | ||
|
||
/** | ||
* Project: Lunox | ||
* Author: adh319 | ||
* Company: EnourDev | ||
* This code is the property of EnourDev and may not be reproduced or | ||
* modified without permission. For more information, contact us at | ||
* https://discord.gg/xhTVzbS5NU | ||
*/ |