created the exception handler