Modify exception handling mechanism