What happens if an exception occurs inside a catch block?
try {}
catch(...)
{
stream.close(); // IO exception here
}
What’s the default behaviour?
>Solution :
Nothing special will happen. A new exception object will be initialized by the throw expression inside the call and a search for a matching catch handler will start, which on escaping the function call will continue on the nearest enclosing try block (enclosing the shown try/catch pair). The old exception object will be destroyed during stack unwinding when leaving the old handler, since it wasn’t rethrown.