Set the environment "ExitCode" variable to 1 on error.