I have some critical logic in a finally block (with an empty try block), because I want to guarantee that the code gets executed even if the thread is aborted. However, I\'d
Have you tried something like this?
try {
try { }
catch (ThreadAbortException)
{
ThreadAbortExceptionBool = true;
}
finally {
// critical logic
if (ThreadAbortExceptionBool)
// Whatever
}
}
catch(Exception ex) {
// ThreadAbortException is not caught here, but exceptions thrown
// from within the critical logic are
}