Fixed tests after changes to exception handling.