A
Adam Clauss
Consider the following code:
try
{
methodA();
try
{
methodB();
}
finally
{
methodC();
}
}
catch (Exception e)
{
//some sort of error handling
}
If methodA completes successfully, and methodB throws an exception, methodC
would then be called before the catch statement correct?
What happens if methodC then throws an exception? Which of those exceptions
get's handled in the catch? Is the other exception 'lost'?
try
{
methodA();
try
{
methodB();
}
finally
{
methodC();
}
}
catch (Exception e)
{
//some sort of error handling
}
If methodA completes successfully, and methodB throws an exception, methodC
would then be called before the catch statement correct?
What happens if methodC then throws an exception? Which of those exceptions
get's handled in the catch? Is the other exception 'lost'?