Exception Information From Finally?
I've a problem in a Dispose() routine, the problem is that I need to know if I got to the Dispose() as a part of normal execution or if I got there because of an exception in a using() block.
I know that it has been tried before for transactions, but I don't know if there has been any success there. Here is what I'm trying to achieve:
IDisposable dispoable = new MocksRepository();
try
{
throw new Exception();
}
finally
{
if (/*an exception occured*/)
return;
disposable.Dispose()
}
Comments
Comment preview