Skip to content

Commit

Permalink
better error catching?
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragon1320 committed Oct 11, 2018
1 parent 48c8175 commit 32da173
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,4 +719,4 @@ client.login(config.discord_token).then(() => {
}).catch(error => {

console.error(error);
});
});
10 changes: 8 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,5 +436,11 @@ Promise.all(promises).then(() => {
//

// do stuff
require("./bot");
require("./web");
try {

require("./bot");
require("./web");
} catch(error) {

genLogger.fatalError(`${Date.now()} - fatal error: ${error}`);
}

0 comments on commit 32da173

Please sign in to comment.