add the exception handler