提交 14f3c4d9 编写于 作者: d-u-a's avatar d-u-a 提交者: qiang

fix: report

上级 644f2018
......@@ -40,6 +40,12 @@ class ErrorReport {
if (!this._shouldReport(err)) {
return
}
if (typeof err === 'object') {
try {
err = err.toString()
} catch (e) {}
}
err = normalizePath(err) || ''
err = err.replace(this._UNI_INPUT_DIR_REG, 'UNI_INPUT_DIR')
......@@ -151,5 +157,5 @@ process
global.__error_reporting__ && global.__error_reporting__('unhandledRejection', reason)
})
.on('uncaughtException', err => {
global.__error_reporting__ && global.__error_reporting__('uncaughtException', err)
global.__error_reporting__ && global.__error_reporting__('uncaughtException', err.stack)
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册