GoogleCloudPlatform / GoogleCloudPlatform/stackdriver-errors-js

Error string normalization

未关闭
#25 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
360
派生
54
PR 合并指标
30 天内没有已合并 PR

描述

I'm not sure if this is within the scope of this project or not. But I did notice that different browsers will have different error strings for the same error. E.g.

`ReferenceError: Can't find variable: errorHandler`
in
`Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.79 Mobile/14A456 Safari/602.1`

vs

`ReferenceError: errorHandler is not defined`
in
`Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.70 Safari/537.36 `

The full stack trace isn't the exact same either, just function names differ I think:

```
ReferenceError: errorHandler is not defined
at (https://redditp.com/js/script.js:615)
at Object.success (https://redditp.com/js/EmbedIt.js:94)
at i (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:2)
at Object.fireWith (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:2)
at z (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:4)
at HTMLScriptElement.c (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:4)
at HTMLScriptElement.dispatch (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:3)
at HTMLScriptElement.r.handle (jquery.min.js:3)
```

vs

```
ReferenceError: Can't find variable: errorHandler
at (https://redditp.com/js/script.js:615)
at success (https://redditp.com/js/EmbedIt.js:94)
at i (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:2)
at fireWith (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:2)
at z (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:4)
at c (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:4)
at dispatch (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:3)
at handle (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:3)
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。