Refactored the error interface.