Exception handling patch