Stop when an error occurs (error param specified.)