Updated exception handler.