=?Utf-8?B?TWlrZSBCaW5rcw==?= <Mi*******@discussions.microsoft.com> wrote
in news:7E**********************************@microsof t.com:
I wish to make sure all unhandled exceptions (UE) are handled by a
central handler.
While I'm not sure this deals with your question directly, there is one
thing you need to keep in mind when using AppDomain.UnhandledException.
AppDomain.UnhandledException is NOT a "handler" for the exception - it is
just something that the framework uses to notify you that an exception has
occurred.
I dealt with a similar issue recently as I was developing some code for
handling plugins. The details depend on which version of .NET you are
running. If I remember correctly, the following applies:
In .NET 1.1, exceptions thrown on other threads die away without causing
the application to die.
In .NET 2.0, exceptions thrown on other threads will cause the application
to die.
See the following: (watch the URL wrap)
http://lab.msdn.microsoft.com/Produc...Feedback.aspx?
feedbackId=FDBK21092
A quote from the above URL: "As it turns out, the documentation of
UnhandledException is incorrect. (It's always been incorrect; I've filed a
bug to get it fixed.) The UnhandledException event handler is just a
notification that an exception has gone unhandled. Registering an event
handler does not actually handle the exception; it just handles the event."
-mdb