|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Exception handling behaves differently in debug and release versioI have a class library which throws exceptions on errors. I have an
exception handler several levels above where the exception is thrown to catch exceptions. When I run the app in the debugger the exception handler is called, however, when running the app outside of the debugger I get the unhandled exception dialog and my exception handler is not called. I am using V2.0 and VS 2005. Does anyone know why this is? Hi,
I had the exact same behavior in one of my tests projects... I never found why it behaved like this... I'm also looking for an answer... Can someone help? ThunderMusic Show quote "RFlaugher" <RFlaug***@discussions.microsoft.com> wrote in message news:BC0F4564-7618-4DB7-95DC-F200EABE224D@microsoft.com... >I have a class library which throws exceptions on errors. I have an > exception handler several levels above where the exception is thrown to > catch > exceptions. When I run the app in the debugger the exception handler is > called, however, when running the app outside of the debugger I get the > unhandled exception dialog and my exception handler is not called. I am > using V2.0 and VS 2005. Does anyone know why this is? Hello RFlaugher,
Outside the debugger but the debug version or release? R> I have a class library which throws exceptions on errors. I have an R> exception handler several levels above where the exception is thrown R> to catch exceptions. When I run the app in the debugger the R> exception handler is called, however, when running the app outside of R> the debugger I get the unhandled exception dialog and my exception R> handler is not called. I am using V2.0 and VS 2005. Does anyone R> know why this is? R> --- WBR, Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche In article <BC0F4564-7618-4DB7-95DC-F200EABE2***@microsoft.com>, RFlaugher
wrote: > When I run the app in the debugger the exception handler is Use the Exceptions function in the VS Debug menu to tailor how exceptions > called, however, when running the app outside of the debugger I get the > unhandled exception dialog and my exception handler is not called are handled by the debugger. It sounds as if you are set to have the debugger handle them first (before your exception handler). If you set the debugger to break on second chance exceptions, VS will let your exception handler take the exception and only break if the exception isn't handled. Mike |
|||||||||||||||||||||||