insomnia/packages/insomnia-app/app/main/error-handling.ts
Dimitri Mitropoulos 5f4c19da35
[TypeScript] Phase 1 & 2 (#3370)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-12 18:35:00 +12:00

9 lines
262 B
TypeScript

export function init() {
process.on('uncaughtException', err => {
console.error('[catcher] Uncaught exception:', err.stack);
});
process.on('unhandledRejection', (err: Error) => {
console.error('[catcher] Unhandled rejection:', err.stack);
});
}