Modifying exception handling for handler.