handle exceptions inside the outer exception handling