Fixing exception handling for the athrow case.