Rework exception handling.