I'm trying to implement an app level event handler. For starters I jus
wanted to trap the bubbled up exception in my main function and display
dialog box. It works fine in debug mode but in release mode it pops up
windows error dialog with a stack trace. How do I configure things t
handle the error the same in debug as it does in release

tr

Application.Run(new frmMain())

catch (Exception ex

MessageBox.Show( ...


thanks
jagdish

Re: Release versus Debug exception problem by hirf-spam-me-here

hirf-spam-me-here
Thu Apr 22 13:05:49 CDT 2004

* "=?Utf-8?B?SmFnZGlzaA==?=" <anonymous@discussions.microsoft.com> scripsit:
> I'm trying to implement an app level event handler. For starters I just
> wanted to trap the bubbled up exception in my main function and display a
> dialog box. It works fine in debug mode but in release mode it pops up a
> windows error dialog with a stack trace. How do I configure things to
> handle the error the same in debug as it does in release?

Add a handler to 'System.Windows.Forms.Application.ThreadException'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>