Pre Merge pull request !132 from 小花花花儿/N/A

This commit is contained in:
小花花花儿 2023-12-11 13:25:07 +00:00 committed by Gitee
commit 27cae37900
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 10 additions and 0 deletions

View File

@ -43,6 +43,16 @@ async function UpdateTitle() {
/** 设置时区 */
process.env.TZ = 'Asia/Shanghai'
/** 捕获未处理的错误 */
process.on('uncaughtException', (error) => {
let err = error
if (logger) {
logger.error(err)
} else {
console.log(err)
}
})
/** 捕获未处理的Promise错误 */
process.on('unhandledRejection', (error, promise) => {
let err = error