If the ECS encounters an error, processing is halted and the error level is set to the number of the error encountered. The value can be retrieved through the built-in function errorlevel. When no errors are detected, errorlevel contains the constant ECS_E_ERRORFREE, which has a value of zero. EcsGetError is a subroutine that sets a string variable to the error message associated with the error level passed to it.