This commit is contained in:
lyswhut
2022-10-29 11:36:35 +08:00
parent 66b965d9f7
commit e45cee6596
715 changed files with 57096 additions and 31771 deletions
+18
View File
@@ -0,0 +1,18 @@
import { log } from './utils'
const ignoreErrorMessage = [
'Possible side-effect in debug-evaluate',
'Unexpected end of input',
]
process.on('uncaughtException', err => {
if (ignoreErrorMessage.includes(err.message)) return
console.error('An uncaught error occurred!')
console.error(err)
log.error(err)
})
process.on('unhandledRejection', (reason, p) => {
console.error('Unhandled Rejection at: Promise ', p)
console.error(' reason: ', reason)
log.error(reason)
})