print exception in catch block