简体   繁体   English

为什么我无法捕获此异常?

[英]Why i can't catch this Exception?

Why I can't catch the following XamlParseException ? 为什么我无法捕获以下XamlParseException

在此处输入图片说明

After I click the Continue button the program continues with a normal behavior (an Exception is catched and the ex.Message is printed on the console). 单击“ 继续”按钮后,程序将继续正常运行(捕获到异常并在控制台上打印出ex.Message )。

The problem is the Visual Studio exception dialog. 问题是Visual Studio异常对话框。 Why it appears? 为什么会出现?

You have break on ALL exceptions turned on in debugging most likely. 您很有可能在调试中打开了所有异常。 Take a look at "Exceptions..." (Ctrl+Alt+E) under the Debug menu, see if the "CLR Exceptions" has Thrown ticked. 查看“调试”菜单下的“例外...”(Ctrl + Alt + E),看看是否已选中“投掷”“ CLR例外”。 If so then you might want to untick it. 如果是这样,那么您可能想要取消选中它。

When enabled this means that even thrown exceptions that are normally caught (first chance exceptions) will be caught by the debugger. 启用后,这意味着即使是通常捕获的异常(第一次机会异常)也会被调试器捕获。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM