Exception handling rework