fixes
parent
13e57f5d1e
commit
d421dda0ca
|
@ -34,11 +34,12 @@ const utils = require('./utils');
|
||||||
const main = require('./main');
|
const main = require('./main');
|
||||||
const knex = require('./knex');
|
const knex = require('./knex');
|
||||||
const legacyMigrator = require('./legacy/legacyMigrator');
|
const legacyMigrator = require('./legacy/legacyMigrator');
|
||||||
|
const { client } = require('./knex');
|
||||||
|
|
||||||
// Error handling
|
// Error handling
|
||||||
process.on('uncaughtException', err => {
|
process.on('uncaughtException', err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
utils.postError(config.errorChannelId, `\`\`\`js\n${err.stack}\n\`\`\``);
|
// utils.postError(config.errorChannelId, `\`\`\`js\n${err.stack}\n\`\`\``);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Force crash on unhandled rejections (use something like forever/pm2 to restart)
|
// Force crash on unhandled rejections (use something like forever/pm2 to restart)
|
||||||
|
@ -47,7 +48,8 @@ process.on('unhandledRejection', err => {
|
||||||
// We ignore stack traces for network errors from Eris (their stack traces are unreadably long)
|
// We ignore stack traces for network errors from Eris (their stack traces are unreadably long)
|
||||||
err = new Error(err.message);
|
err = new Error(err.message);
|
||||||
}
|
}
|
||||||
utils.postError(config.errorChannelId, `\`\`\`js\n${err.stack}\n\`\`\``);
|
console.error(err);
|
||||||
|
// utils.postError(config.errorChannelId, `\`\`\`js\n${err.stack}\n\`\`\``);
|
||||||
});
|
});
|
||||||
|
|
||||||
(async function() {
|
(async function() {
|
||||||
|
|
Loading…
Reference in New Issue