提交 1f4af288 编写于 作者: d-u-a's avatar d-u-a

fix: report

上级 7d782f4b
...@@ -41,6 +41,12 @@ class ErrorReport { ...@@ -41,6 +41,12 @@ class ErrorReport {
return return
} }
if (typeof err === 'object') {
try {
err = err.toString()
} catch (e) {}
}
err = normalizePath(err) || '' err = normalizePath(err) || ''
err = err.replace(this._UNI_INPUT_DIR_REG, 'UNI_INPUT_DIR') err = err.replace(this._UNI_INPUT_DIR_REG, 'UNI_INPUT_DIR')
err = err.replace(this._UNI_CLI_CONTEXT_REG, 'UNI_CLI_CONTEXT') err = err.replace(this._UNI_CLI_CONTEXT_REG, 'UNI_CLI_CONTEXT')
...@@ -151,5 +157,5 @@ process ...@@ -151,5 +157,5 @@ process
global.__error_reporting__ && global.__error_reporting__('unhandledRejection', reason) global.__error_reporting__ && global.__error_reporting__('unhandledRejection', reason)
}) })
.on('uncaughtException', err => { .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.
先完成此消息的编辑!
想要评论请 注册