Change exceptions to be consistent with the rest of the codebase.