Keep track of the exit code upon error.