changes to exception handling