什么时候会在 window.onError 函数上提供正确的堆栈跟踪? [英] When will proper stack traces be provided on window.onError function?

查看:29
本文介绍了什么时候会在 window.onError 函数上提供正确的堆栈跟踪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多其他编程语言(例如 java、ruby)中的异常/错误总是提供堆栈跟踪/回溯信息.

Exceptions/Errors in many other programming languages (say java, ruby) always provide stacktrace/backtrace information.

在 JavaScript 中未处理的错误会被 window.onError 捕获.

In JavaScript unhandled Errors get caught by window.onError.

虽然那个函数没有得到 Error 对象,所以我们无法访问该对象的 stack 属性.

Although that function does not get the Error object, so we have no access to the object's stack property.

是否有关于何时会发生任何变化的可靠信息来源?

Is there any reliable source of information about when will there be any change on that?

推荐答案

似乎 error 对象本身将是提供给 onerror 的第五个参数.http://html5.org/tools/web-apps-tracker?from=8085&to=8086
http://www.whatwg.org/specs/web-apps/current-work/ - 第 7.1.6.1 节

It seems that the error object itself will be the fifth parameter supplied to onerror. http://html5.org/tools/web-apps-tracker?from=8085&to=8086
http://www.whatwg.org/specs/web-apps/current-work/ - section 7.1.6.1

这篇关于什么时候会在 window.onError 函数上提供正确的堆栈跟踪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆