Update code to revert the changes to throw exceptions