init source
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
const crash = reason => {
|
||||
process.on(reason, err => {
|
||||
console.error(reason, err.stack)
|
||||
process.exit(-1)
|
||||
})
|
||||
}
|
||||
|
||||
crash('unhandledRejection')
|
||||
crash('uncaughtError')
|
||||
crash('warning')
|
||||
Reference in New Issue
Block a user