Plenty exceptions when using webbrowser control c#

依然范特西╮ 提交于 2019-12-14 03:36:22

问题


I am using webbrowser-control to display multiple webpages in a C# form. Several webpages are giving me 100+ errors like:

First-chance exception Microsoft C++ exception: 
    Js::JavascriptExceptionObject at memory location xxx

How can I catch or suppress these exceptions? There are so many my program is crashing.


回答1:


You can suppress JavaScript errors by setting the WebBrowser1.ScriptErrorsSuppressed =True



来源:https://stackoverflow.com/questions/24806185/plenty-exceptions-when-using-webbrowser-control-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!