It would throw the new exception and the original exception would not be
seen. Given the code...
try
{
throw new Exception("1st exception");
}
catch(Exception ex1)
{
// catches 1st exception
}
finally
{ // runs after the catch block catches the 1st exception
throw new Exception("2nd exception");
}
the 2nd exception is not caught in this snippet, and unless it gets caught
somewhere further back up the call stack it would eventually result in an
unhandled exception.
If the entire snippet were enclosed in a surrounding try-catch block, then
the outermost catch would catch the 2nd exception - the 1st exception gets
dropped.
"Alex" <al********@hotmail.com> wrote in message
news:uw**************@TK2MSFTNGP11.phx.gbl...
Hi.
What would happen if an exception occurs inside a Finally block and at the
same time inside the try another exception was thrown without been handled
by any catch?
Alejandro.