Add exception handler.