开发者

Unusual exception behaviour?

I have never come across this kind of behaviour before and I wondered if anyone is able to shed some light on the matter?

So as you can see in the picture, I am catching exceptions of type AccessViolationException, and yet the debugger is complaining that the exception is unhandled!

How is it 开发者_如何学Cpossible?

Unusual exception behaviour?

Oh, and I know you shouldnt have an empty catch block, that's not my question.

Thanks!

Edit: Now I am getting this one instead:

Unusual exception behaviour?


Handling Corrupted State Exceptions is something you have to do explicitly, you can catch those by adding the [HandledProcessCorruptedStateExceptions] attribute to the function...

Please note that these are unhandled with a reason as unexpected conditions can still be harmful if they are ignored or dealt with generically. There is no guarantee in either of these scenarios that what you're doing is completely safe! Only handle it in a scenario where just terminating the process is unacceptable.


Odd things like this happen to me once in a while, I'm going to recommend the newbie IT method. Restart your computer. The CLI Environment in .NET gets really buggy sometimes as I've had my code literally hang inside of a foreach loop before.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜