IE9中的错误处理 [英] Error handling in IE9

查看:71
本文介绍了IE9中的错误处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

IE9行为与IE8行为不同。

IE9 behavior differs from IE8 behavior.

重现步骤:

1。转到Internet选项 - >高级

1. Go to Internet Options -> Advanced

2。取消选中复选框"禁用脚本调试(Internet Explorer)"和"禁用脚本调试(其他)"

2. Uncheck checkboxes "Disable script debugging (Internet Explorer)" and "Disable script debugging (Other)"

3。打开页面

4。单击页面上带有未处理的javascript异常的按钮

4. Click button on the page with unhandled javascript exception

预期行为:

window.onerror处理程序将被触发。

window.onerror handler will be fired.

行为错误:

window.onerror未被解雇

window.onerror is not fired

您能否回答以下问题:

1。这种行为是设计还是已知问题?

1. Is this behavior by design or it is a known issue?

2。我们在javascript中有另一个全局错误处理程序来捕获未处理的异常吗?

2. Do we have another global error handler in javascript to catch unhandled exceptions?

推荐答案

您没有提供指向测试页面或网页的链接,其中列举了问题。检查是否要取消事件冒泡。

You did not give a link to a test page or your web page where the issue is exemplified. Check to see if you are cancelling the event bubbling.

 

使用开发人员工具在IE9中进行调试(与外部调试器分开,如VS调试器)

To debug in IE9 using the Developer Tool (separate from external debuggers like the VS debugger)

选择Script选项卡,然后按'Start Debugging'按钮......页面将自动刷新,同时嵌入Developer Tool。错误将记录在Developer Tool中控制台或如果你选择中断错误(在脚本控制台中)执行
将停在错误点并在Developer Tools控制台中显示错误消息。

select the Script tab and press the 'Start Debugging' button.... the page will refresh automatically with the Developer Tool sinked in. Errors will be logged in the Developer Tool console or if you chose to break on errors (in the Script console) execution will stop at the error point and the Error message displayed in the Developer Tools console.

IE9是与其他现代浏览器相同......脚本错误不会停止执行浏览器解析和渲染....这是为了在访问经过严格测试的网页时停止在早期版本的IE上发生的恼人的脚本错误消息。通过
,答案中最多的问题是"脚本错误"消息...像所有其他浏览器一样,IE9默认情况下不会显示脚本错误消息...正确的唯一受众应该关注脚本错误是开发人员。

IE9 is the same as other modern browsers...scripting errors don't stop execution of the browser parsing and rendering.... this is to stop the annoying scripting error messages that occur on earlier versions of IE when visiting poorly tested web pages. By far the greatest number of questions at answers was 'Scripting error' messages... like all other browsers IE9 does not display the scripting error messages by default... Rightly so the only audience that should be concerned with scripting errors are developers.


这篇关于IE9中的错误处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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