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