public void addError(ErrorMessage error) {
        getError(); // update the list of errors
        if (errorHit == null)
            add(new DefaultErrorHit(getSource(), error));
        else
            errorHit.addError(error);
    }
Adds an error to this result
container-search/src/main/java/com/yahoo/search/result/HitGroup.java