Skip to content

Commit

Permalink
feat: catch uncaught exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
SpongeBed81 committed Aug 30, 2024
1 parent 2d89c88 commit cadaf57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import { delWithPattern } from '@utils/cache';
import traverseEvents from './router';
import { info, success, warn } from './utils/logger';

process.on('uncaughtException', function (err) {
console.error(err);
});

const app = App();
const io = new Server();

Expand Down

0 comments on commit cadaf57

Please sign in to comment.