Replace uncaughtException handler…
…with async exit hook uncaught exception handler which will make it exit after completing exit hooks.
This commit is contained in:
parent
08da3241ff
commit
cc7d6780e2
|
@ -17,9 +17,10 @@ global.dClient = new Discord.Client({ disableEveryone: true });
|
|||
} catch(e) {}
|
||||
}
|
||||
process.on('unhandledRejection', error => onError(error, "Unhandled Rejection"));
|
||||
process.on('uncaughtException', error => onError(error, "Uncaught Exception"));
|
||||
exitHook.uncaughtExceptionHandler(error => onError(error, "Uncaught Exception"));
|
||||
dClient.on('error', error => onError(error, "Discord Client Error"));
|
||||
dClient.on('warn', error => onError(error, "Discord Client Warning"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue