Wrapped error logic up in error logic.