master
Matthew 2020-08-18 20:42:47 -04:00
parent 13e57f5d1e
commit d421dda0ca
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 4 additions and 2 deletions

View File

@ -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() {