mirror of
https://github.com/Rushilwiz/innhibit.git
synced 2025-04-21 19:09:49 -04:00
11 lines
194 B
JavaScript
11 lines
194 B
JavaScript
const crash = (reason) => {
|
|
process.on(reason, (err) => {
|
|
console.error(reason, err.stack)
|
|
process.exit(-1)
|
|
})
|
|
}
|
|
|
|
crash('unhandledRejection')
|
|
crash('uncaughtError')
|
|
crash('warning')
|