N
Nobody
In my C# application, I am creating a thread that is frequently doing stuff
and should be up for the life of the application. If an exception occurs, I
properly clean-up in finally blocks, but I never catch the exception...
because if an exception occurs it is a bug. So the thread terminates and an
UnhandledException event is invoked. In the data passed into the event,
there is a read-only IsTerminating property. For this property, MSDN says
"IsTerminating returns false for managed threads created by an application."
That is what is occuring my case for a release build.
I don't want my thread to just silently disappear, I want the application to
completely crash. I cannot modify IsTerminating to true, and rethrowing the
exception in the unhandled exception event has no effect. How can I get my
application to crash if my thread causes an unhandled exception?
and should be up for the life of the application. If an exception occurs, I
properly clean-up in finally blocks, but I never catch the exception...
because if an exception occurs it is a bug. So the thread terminates and an
UnhandledException event is invoked. In the data passed into the event,
there is a read-only IsTerminating property. For this property, MSDN says
"IsTerminating returns false for managed threads created by an application."
That is what is occuring my case for a release build.
I don't want my thread to just silently disappear, I want the application to
completely crash. I cannot modify IsTerminating to true, and rethrowing the
exception in the unhandled exception event has no effect. How can I get my
application to crash if my thread causes an unhandled exception?