mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 05:00:18 +00:00
Added uncaughtException event
This commit is contained in:
parent
984e8aab76
commit
ab950352fa
@ -86,6 +86,10 @@ class RadioClient extends Client {
|
|||||||
require(`${events}SIGTERM`).execute(this);
|
require(`${events}SIGTERM`).execute(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
process.on('uncaughtException', (error) => {
|
||||||
|
require(`${events}uncaughtException`).execute(this, error);
|
||||||
|
});
|
||||||
|
|
||||||
this.on("error", error => {
|
this.on("error", error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
|
7
src/client/events/uncaughtException.js
Normal file
7
src/client/events/uncaughtException.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
module.exports = {
|
||||||
|
name: 'uncaughtException',
|
||||||
|
execute(client, error) {
|
||||||
|
console.log(error.stack);
|
||||||
|
process.emit('SIGINT');
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user