Hi,
try
{
throw new Exception("test");
}
finally
{
//Inspect the exception ????
//Log(Exception);
}
Is there a way to get the exception from the run-time in the finally?
I cannot use a catch :-)
Thanks for your answers.
I cannot use a catch because its not actually my code(to refactor).
We want to wrap a piece of code like that:
using(CriticalFlow(policy))
{
//Not my code.
flow.Succeeded();
}
In CriticalFlow finally block we need to inspect the exception, if succeeded was not called, and alert whoever by whichever means.
I hope it throws some light to the original question.
Thanks again.