Handling unhandledRejection error

This commit is contained in:
sairajzero 2023-06-20 15:33:28 +05:30
parent e60a904e1d
commit 98b5190b8f

View File

@ -14,4 +14,8 @@ try {
}
if (!process.argv.includes("--debug"))
global.console.debug = () => null;
global.console.debug = () => null;
process.on('unhandledRejection', (reason, p) => {
console.trace('Unhandled Rejection at: Promise', p, 'reason:', reason);
});