switched an exception to an error