log brr
This commit is contained in:
parent
d3b273010e
commit
db82579172
21
index.js
21
index.js
|
@ -125,17 +125,20 @@ client.on("messageCreate", async (message) => {
|
|||
global.dmHandlers[message.author.id](message);
|
||||
});
|
||||
|
||||
// Global error handling for unhandled promise rejections and uncaught exceptions
|
||||
process.on('unhandledRejection', (reason, promise) => {
|
||||
log.error(`Unhandled Rejection: ${reason}`);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
|
||||
// Application specific logging, throwing an error, or other logic here
|
||||
});
|
||||
// Global error handling for unhandled promise rejections and uncaught exceptions
|
||||
process.on('unhandledRejection', (reason, promise) => {
|
||||
log.error(`Unhandled Rejection: ${reason}`);
|
||||
|
||||
process.on('uncaughtException', (error) => {
|
||||
log.error('Uncaught Exception thrown:', error);
|
||||
// Application specific logging, throwing an error, or other logic here
|
||||
});
|
||||
// Application specific logging, throwing an error, or other logic here
|
||||
});
|
||||
process.on('uncaughtException', (error) => {
|
||||
log.error('Uncaught Exception thrown:', error);
|
||||
// Application specific logging, throwing an error, or other logic here
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
const port = process.env.SERVER_PORT || 3000;
|
||||
|
||||
|
|
Loading…
Reference in a new issue