Exception Handling

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Hello,

I have a Windows Forms application in which I've implemented custom
exception handling for most of the UI-related methods. If an exception
occurs, it is "caught" and passed on to a standard exception handler that
will format and display the error information and give the user a chance to
copy, print, e-mail, etc.

I have a problem in that I would like the exceptions to -not- be handled
during debug mode. In other words, during debug mode I would like any
exceptions to break into the VS .NET debugger and not display my custom
exception handler dialog. I only want the custom exception handler to work
during the "release" version.

Is there any way of implementing this short of me having to put #if's and
#end if's around all my try-catch-finally blocks?

--- Thanks, Jeff
 
Jeff,
I would leave the exception handlers alone, and just change the options
under 'Debug - Exceptions'.

Select 'Common Language Runtime Exceptions', then change either or both of
'When the exception is thrown' and 'if the exception is not handled'.

Hope this helps
Jay
 
Back
Top