Why is .NET exception not caught by try/catch block?

前端 未结 25 787
Happy的楠姐
Happy的楠姐 2020-12-04 19:24

I\'m working on a project using the ANTLR parser library for C#. I\'ve built a grammar to parse some text and it works well. However, when the parser comes across an illeg

25条回答
  •  旧时难觅i
    2020-12-04 19:49

    I downloaded your code and everything work as expected.

    Visual Studio debugger correctly intercepts all exceptions. Catch blocks work as expected.

    I'm running Windows 2003 server SP2, VS2008 Team Suite (9.0.30729.1 SP)

    I tried to compile you project for .NET 2.0, 3.0 & 3.5

    @Steve Steiner, debugger options you mentioned have nothing to do with this behavior.

    I tried to play with these options with no visible effects - catch blocks managed to intercept all exceptions.

提交回复
热议问题