Add custom exception handler.