Adds an error message to the internal list of errors,
also raised the "has errors" flag.<p>

@param value the value that contains the error
@param message the error message to add
357613
public void addError(I_CmsXmlContentValue value, String message) {

        m_hasErrors = true;
        Locale locale = value.getLocale();
        Map<String, String> localeErrors = getLocalIssueMap(m_errors, locale);
        localeErrors.put(value.getPath(), message);

        if (LOG.isDebugEnabled()) {
            LOG.debug(
                Messages.get().getBundle().key(Messages.LOG_XMLCONTENT_VALIDATION_ERR_2, value.getPath(), message));
        }
    }
725468
@SuppressWarnings("unchecked")
	public void addErrors(String field, List<String> errors) {
		Assert.notNull(field, "field must not be null");
		Assert.notNull(errors, "field must not be null");

		// do not overwrite existing errors
		Map<String, List<String>> errorMap = (Map<String, List<String>>) this.result
				.get(ERRORS_PROPERTY);
		if (errorMap == null) {
			errorMap = new HashMap<>();
			addResultProperty(ERRORS_PROPERTY, errorMap);
		}

		List<String> fieldErrors = errorMap.get(field);
		if (fieldErrors == null) {
			fieldErrors = new ArrayList<>();
			errorMap.put(field, fieldErrors);
		}
		fieldErrors.addAll(errors);

		addResultProperty(SUCCESS_PROPERTY, Boolean.FALSE);
	}
613320
public void setErrorMessage(String message) {

        m_messageText.setInnerHTML(message);
        addStyleName(formCss().hasError());
        m_hasError = true;
    }
626728
final void add(Message message)
        throws NullPointerException {

        if (message == null) {
            throw new NullPointerException("Message can't be null");
        }

        this.messages.get(message.getLevel()).add(message);
    }
673059
@Override public void addError(String message) {
		ast.printMessage(Diagnostic.Kind.ERROR, message, this, null, true);
	}
399247
public void addValue(String value)
    {
        if(this.values == null)
            this.values = new ArrayList<String>();
        this.values.add(value);
    }
953828
public void addValue(String value) {
		contents.add(value);
		if (value.trim().length() > 0) {
			if (contents.size() == 1) {
				containsSingleString = true;
			} else {
				containsSingleString = false;
				containsMarkupText = true;
			}
		}
	}
388006
public void error(String message, Object... args) {
    error(String.format(message, args), getThrowable(args));
  }
818148
public final void addValue(@NonNull final String value) {
        Condition.INSTANCE.ensureNotNull(value, "The value may not be null");

        if (this.values != null) {
            if (this.values.add(value)) {
                if (persistSet(this.values)) {
                    notifyChanged();
                }
            }
        } else {
            Set<String> newValues = new HashSet<>();
            newValues.add(value);
            setValues(newValues);
        }
    }
895290
public void error(String message, Object ... args) {
    if (log.isErrorEnabled()) {
      log.error(String.format(message, args));
    }
  }
1194178
public void addError(Throwable error) {
        if (error == null) {
            throw new NullPointerException("Error cannot be null");
        }
        if (error instanceof AssumptionViolatedException) {
            AssertionError e = new AssertionError(error.getMessage());
            e.initCause(error);
            errors.add(e);
        } else {
            errors.add(error);
        }
    }
766990
public static void notEmpty(String value, String message) throws IllegalArgumentException {
		if (value == null || "".equals(value.trim())) {
			throw new IllegalArgumentException("A precondition failed: " + message);
		}
	}
1175855
public void error(String message) throws IOException, ServletException {
        errorWithMarkup(message==null?null:Util.escape(message));
    }
992061
public void set(MessageMap value) {
    if (array != null)
      array[value.multiChoice.intValue()] = value;
    else
      hashtable.put(value.multiChoice, value);
  }
1320145
def add(self, lines, message):
		
		error = Error(message)

		if error not in self.errors:
			self.errors[error] = []

		self.errors[error].extend(lines)
124723
public void addError(Message message, boolean fatal) throws CompilationFailedException {
        if (fatal) {
            addFatalError(message);
        }
        else {
            addError(message);
        }
    }
753280
@Override
    @SuppressFBWarnings("DM_EXIT")
    public void logError(String message) {
        System.err.println("Error: " + message);
        System.exit(1);
    }