R
Ralf Jansen
For logging purposes i want to determine if the current executing code is
running in an ~exceptionhandling context~. I need no details about the exception
just if an exception has been thrown and hasn't been handled yet.
Following code should make clear what i mean and where i need that info.
try
{
try
{
throw new Exception();
}
finally
{
// here i want to know if an exception has been thrown
}
}
catch(Exception e)
{
// doSomething
throw;
}
If i put a breakpoint inside the finally block i can inspect the Exception in
the debugger through the '$Exception' pseudo variable. Is it possible to get
that also in code?
Thanks
running in an ~exceptionhandling context~. I need no details about the exception
just if an exception has been thrown and hasn't been handled yet.
Following code should make clear what i mean and where i need that info.
try
{
try
{
throw new Exception();
}
finally
{
// here i want to know if an exception has been thrown
}
}
catch(Exception e)
{
// doSomething
throw;
}
If i put a breakpoint inside the finally block i can inspect the Exception in
the debugger through the '$Exception' pseudo variable. Is it possible to get
that also in code?
Thanks