Application Object and SetUnhandledExceptionMode
| Automatic | |
| CatchException | |
| ThrowException |
Any idea of what this does or how to use it. I found nothing in the help doc or on the web.
| Automatic | |
| CatchException | |
| ThrowException |
chuck02323 wrote:
I was going to write a Win Forms application which normally starts with my putting in my unhandled exception code. I see that the application class now has a UnhandledExceptionMode Method, with members of
Automatic CatchException ThrowException
Any idea of what this does or how to use it. I found nothing in the help doc or on the web.
This is actually an enumeration in the System.Windows.Forms namespace. It is used on the NativeWindow class, where you can tell it what to do when an unhandled exception is caught. You would call the SetUnhandledExceptionMode method.
Hope this helps.
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
As per the documentation:
Automatic: Route all exceptions to the ThreadException handler, unless the application's configuration file specifies otherwise.
CatchException: Always route exceptions to the ThreadException handler. Ignore the application configuration file.
ThrowException: Never route exceptions to the ThreadException handler. Ignore the application configuration file.