Update exception handling logic