Add a message with status level being {@link ValidationStatus#ERROR}
349464
public void addErrorMsgs(final Set<String> msgs) {
    if (msgs != null) {
      this._errorMsgs.addAll(msgs);
      if (!msgs.isEmpty()) {
        this._status = ValidationStatus.ERROR;
      }
    }
  }
1215502
public function setValidationStatus(string $validation_status = "F") : CNabuDataObject
    {
        if ($validation_status === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$validation_status")
            );
        }
        $this->setValue('nb_user_validation_status', $validation_status);
        
        return $this;
    }
913782
void completedStatus(String buildResult, String message) {
        completedStatus.add(new GhprbBuildResultMessage(
                GHCommitState.valueOf(buildResult),
                message
        ));
    }
1206312
public void add(ValidationResult validation) {
    correct &= validation.correct;
    if (!validate) return;
    errors.addAll(validation.errors);
    warnings.addAll(validation.warnings);
  }
60097
public final void registerStatus(TaskStatus status) {
	TaskStatus.validate(this.status, status);
	this.status = status;
	if (status.equals(TaskStatus.SUBMITTED)) {
	  clear();
	}
  }
1029209
public void setMessage(String message) {
        this.message = message;
        if (errorMessage == null) {
            logger.debug("Setting status bar message to \"" + message + "\"");
            messageLabel.setText(this.message);
        }
    }
562222
def SetStatus(self, status, message="", backtrace=None):
    """"""
    self.status.status = status
    self.status.error_message = utils.SmartUnicode(message)
    if backtrace:
      self.status.backtrace = utils.SmartUnicode(backtrace)
38847
public HttpClientResponseBuilder withStatus(int statusCode) {
        Action lastAction = newRule.getLastAction();
        StatusResponse statusAction = new StatusResponse(lastAction, statusCode);
        newRule.overrideLastAction(statusAction);
        return this;
    }
284017
private synchronized void onContextStatusMessage(final ContextStatusPOJO contextStatus,
                                                   final boolean notifyClientOnNewActiveContext) {

    LOG.log(Level.FINER, "Processing context status message for context {0}", contextStatus.getContextId());
    switch (contextStatus.getContextState()) {
    case READY:
      this.onContextReady(contextStatus, notifyClientOnNewActiveContext);
      break;
    case FAIL:
      this.onContextFailed(contextStatus);
      break;
    case DONE:
      this.onContextDone(contextStatus);
      break;
    default:
      this.onUnknownContextStatus(contextStatus);
      break;
    }
    LOG.log(Level.FINER, "Done processing context status message for context {0}", contextStatus.getContextId());

  }
767617
public void validateAndSubmit() {

        CmsValidationController validationController = new CmsValidationController(
            m_fields.values(),
            new I_CmsValidationHandler() {

                /**
                 * @see org.opencms.gwt.client.validation.I_CmsValidationHandler#onValidationFinished(boolean)
                 */
                public void onValidationFinished(boolean ok) {

                    m_formHandler.onSubmitValidationResult(CmsForm.this, ok);
                }

                /**
                 * @see org.opencms.gwt.client.validation.I_CmsValidationHandler#onValidationResult(java.lang.String, org.opencms.gwt.shared.CmsValidationResult)
                 */
                public void onValidationResult(String field, CmsValidationResult result) {

                    updateFieldValidationStatus(field, result);

                }

            });
        validationController.setFormValidator(m_validatorClass);
        validationController.setFormValidatorConfig(createValidatorConfig());
        startValidation(validationController);
    }
840254
public HttpMessage status(final HttpStatus statusCode) {
        statusCode(statusCode.value());
        reasonPhrase(statusCode.name());
        return this;
    }
181326
@Override
  public void onNext(final RemoteMessage<EvaluatorShimProtocol.EvaluatorShimStatusProto> statusMessage) {

    EvaluatorShimProtocol.EvaluatorShimStatusProto message = statusMessage.getMessage();
    String containerId = message.getContainerId();
    String remoteId = message.getRemoteIdentifier();

    LOG.log(Level.INFO, "Got a status message from evaluator shim = {0} with containerId = {1} and status = {2}.",
        new String[]{remoteId, containerId, message.getStatus().toString()});

    if (message.getStatus() != EvaluatorShimProtocol.EvaluatorShimStatus.ONLINE) {
      LOG.log(Level.SEVERE, "Unexpected status returned from the evaluator shim: {0}. Ignoring the message.",
          message.getStatus().toString());
      return;
    }

    this.onResourceAllocated(containerId, remoteId, Optional.<CloudTask>empty());
  }
910446
protected void fail(String message) {
        failed = true;
        messageVector.add(new ValidationMessage(lastElementId, message));
    }
507610
private void errorIf(ClientResponse response,
            ClientResponse.Status[] status, boolean bool)
            throws ClientException {
        ClientResponse.Status clientResponseStatus
                = response.getClientResponseStatus();
        if (bool) {
            if (contains(status, clientResponseStatus)) {
                String message = response.getEntity(String.class);
                throw new ClientException(clientResponseStatus, message);
            }
        } else if (!contains(status, clientResponseStatus)) {
            String message = response.getEntity(String.class);
            throw new ClientException(clientResponseStatus, message);
        }
    }
580816
public void addWarningMsgs(final Set<String> msgs) {
    if (msgs != null) {
      this._warningMsgs.addAll(msgs);
      if (!msgs.isEmpty() && this._errorMsgs.isEmpty()) {
        this._status = ValidationStatus.WARN;
      }
    }
  }
1129237
public void addValidator(Validator validator, String errorKey) {
        if(!errors.containsKey(errorKey))
            errors.addValidator(errorKey, validator);
    }
501108
private void buildErrorStatus(ObjectResult result, String objID, Throwable ex) {
        result.setStatus(ObjectResult.Status.ERROR);
        result.setErrorMessage(ex.getLocalizedMessage());
        if (!Utils.isEmpty(objID)) {
            result.setObjectID(objID);
        }
        if (ex instanceof IllegalArgumentException) {
            m_logger.debug("Object update error: {}", ex.toString());
        } else {
            result.setStackTrace(Utils.getStackTrace(ex));
            m_logger.debug("Object update error: {} stacktrace: {}",
                           ex.toString(), Utils.getStackTrace(ex));
        }
    }