Changes exception handling logic