Creates the HTML for the error message if validation errors were found.<p>

@return the HTML for the error message if validation errors were found
9282
protected String createDialogErrorMessage() {

        if (getException() != null) {
            StringBuffer result = new StringBuffer(8);
            result.append(dialogBlockStart(""));
            result.append("<table border=\"0\">\n");
            result.append("<tr><td><img src=\"");
            result.append(getSkinUri()).append("commons/");
            result.append("error.png");
            result.append("\" border=\"0\" alt=\"\"></td><td class=\"xmlTdError maxwidth\">");
            Throwable t = getException();
            while (t != null) {
                result.append(t.getLocalizedMessage());
                t = t.getCause();
                if (t != null) {
                    result.append("<br>");
                }
            }
            result.append("</table>\n");
            result.append(dialogBlockEnd());
            return result.toString();
        }
        return "";
    }
457475
public String toHtml() {

        CmsMacroResolver resolver = new CmsMacroResolver();
        if (CmsStringUtil.isEmpty(m_title)) {
            m_title = m_messages.key(Messages.GUI_ERROR_0, new Object[] {});
        }
        resolver.addMacro("title", m_title);
        resolver.addMacro("label_error", m_messages.key(Messages.GUI_ERROR_0, new Object[] {}));
        resolver.addMacro("errorstack", CmsException.getFormattedErrorstack(m_throwable));
        resolver.addMacro("message", CmsStringUtil.escapeHtml(getErrorMessage()));
        resolver.addMacro(
            "styleuri",
            OpenCms.getLinkManager().substituteLink(m_cms, "/system/workplace/commons/style/workplace.css"));
        if (CmsStringUtil.isEmpty(m_buttons)) {
            resolver.addMacro("buttons", getDefaultButtonsHtml());
        } else {
            resolver.addMacro("buttons", m_buttons);
            resolver.addMacro("paramaction", m_paramAction);
        }

        if (CmsStringUtil.isNotEmpty(m_hiddenParams)) {
            resolver.addMacro("hiddenparams", m_hiddenParams);
        }
        resolver.addMacro(
            "erroricon",
            OpenCms.getLinkManager().substituteLink(m_cms, "/system/workplace/resources/commons/error.png"));
        Properties errorpage = new Properties();
        try {
            errorpage.load(CmsErrorBean.class.getClassLoader().getResourceAsStream(ERRORPAGE));
        } catch (Throwable th) {
            CmsLog.INIT.error(
                org.opencms.main.Messages.get().getBundle().key(
                    org.opencms.main.Messages.INIT_ERR_LOAD_HTML_PROPERTY_FILE_1,
                    ERRORPAGE),
                th);
        }
        return resolver.resolveMacros(errorpage.getProperty("ERRORPAGE"));
    }
789390
private String getCreationErrorMessage() {

        String message = new String();
        if (!m_resourcesCreated.isEmpty()) {
            // some resources have been created, tell the user which resources were created successfully
            StringBuffer buf = new StringBuffer(64);
            for (String name : m_resourcesCreated.values()) {
                buf.append("<br />");
                buf.append(name);
            }
            message = m_bundle.key(org.opencms.ade.upload.Messages.ERR_UPLOAD_CREATING_1, buf.toString());
        } else {
            // no resources have been created on the VFS
            message = m_bundle.key(org.opencms.ade.upload.Messages.ERR_UPLOAD_CREATING_0);
        }
        return message;
    }
1117691
public ErrorPageType<WebFragmentType<T>> getOrCreateErrorPage()
   {
      List<Node> nodeList = childNode.get("error-page");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ErrorPageTypeImpl<WebFragmentType<T>>(this, "error-page", childNode, nodeList.get(0));
      }
      return createErrorPage();
   }
541535
private String createError(String errorMsg, Throwable t) {

        StringBuffer msg = new StringBuffer();
        msg.append(errorMsg);
        msg.append("\n");
        msg.append(t.getMessage());
        msg.append("\n");
        msg.append(CmsException.getStackTraceAsString(t));

        return createError(msg.toString());
    }
15368
public function getString()
    {
        $html = '';
        if ($this->error->has()) {
            $html .= '<ul class="ccm-error">';
            foreach ($this->error->getList() as $error) {
                $html .= '<li>';
                if ($error instanceof HtmlAwareErrorInterface && $error->messageContainsHtml()) {
                    $html .= (string) $error;
                } else {
                    $html .= nl2br(h((string) $error));
                }
                $html .= '</li>';
            }
            $html .= '</ul>';
        }

        return $html;
    }
1194830
public CmsMessageContainer validateWithMessage() {

        if (m_parsingFailed) {
            return Messages.get().container(Messages.ERR_SERIALDATE_INVALID_VALUE_0);
        }
        if (!isStartSet()) {
            return Messages.get().container(Messages.ERR_SERIALDATE_START_MISSING_0);
        }
        if (!isEndValid()) {
            return Messages.get().container(Messages.ERR_SERIALDATE_END_BEFORE_START_0);
        }
        String key = validatePattern();
        if (null != key) {
            return Messages.get().container(key);
        }
        key = validateDuration();
        if (null != key) {
            return Messages.get().container(key);
        }
        if (hasTooManyEvents()) {
            return Messages.get().container(
                Messages.ERR_SERIALDATE_TOO_MANY_EVENTS_1,
                Integer.valueOf(CmsSerialDateUtil.getMaxEvents()));
        }
        return null;
    }
143831
public I_CmsValidationHandler getValidationHandler() {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_validationHandler)) {
            return new CmsDefaultValidationHandler();
        }
        try {
            I_CmsValidationHandler validationHandler = (I_CmsValidationHandler)Class.forName(
                m_validationHandler).newInstance();
            if (LOG.isInfoEnabled()) {
                LOG.info(
                    Messages.get().getBundle().key(
                        Messages.INIT_VALIDATION_HANDLER_CLASS_SUCCESS_1,
                        m_validationHandler));
            }
            return validationHandler;
        } catch (Throwable t) {
            LOG.error(
                Messages.get().getBundle().key(Messages.INIT_VALIDATION_HANDLER_CLASS_INVALID_1, m_validationHandler),
                t);
            return new CmsDefaultValidationHandler();
        }
    }
813518
function htmlError(result, cb) {
  var message = result.body
    .match(/<h1>Error<\/h1>.+<\/p>/).toString()
    .replace(/<h1>Error<\/h1>/, '')
    .replace(/<\/?p>/g, '');
  cb(new Error(message));
}
426777
public java.util.List<ValidationError> getValidationErrors() {
        if (validationErrors == null) {
            validationErrors = new com.amazonaws.internal.SdkInternalList<ValidationError>();
        }
        return validationErrors;
    }
619436
protected function _toHtml() {
        if ($this->_fixMessages()) {
            if ($this->_shouldUseInjection()) {
                $html = $this->renderView();
            } else {
                $this->_loadMessages();
                $this->_loadSavedMessages();
                if (count($this->getMessages())) {
                    $html = $this->_real_toHtml();
                } else {
                    // Prevent returning an empty <ul></ul>
                    $html = '';
                }
            }
        } else {
            $html = $this->_real_toHtml();
        }
        $this->_directCall = false;
        return $html;
    }
583879
public List<ValidationError> validateInput() {
        List<ValidationError> errors = new ArrayList<>();
        Object value = getModel().getValue(getName());
        ValidationError error;
        for (InputValidator validator : validators) {
            error = validator.validate(value, getName(), getLabel());
            if (error != null){
                errors.add(error);
            }
        }
        return errors;
    }
1373209
public CmsXmlContentErrorHandler validateContent(Map<String, String> contentValues) throws CmsUgcException {

        checkNotFinished();
        try {
            CmsFile file = m_cms.readFile(m_editResource);
            CmsXmlContent content = addContentValues(file, contentValues);
            return content.validate(m_cms);
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
            throw new CmsUgcException(e, CmsUgcConstants.ErrorCode.errMisc, e.getLocalizedMessage());
        }
    }
640210
public static FormValidation respond(Kind kind, final String html) {
        return new FormValidation(kind) {
            public String renderHtml() {
                return html;
            }
            @Override public String toString() {
                return kind + ": " + html;
            }
        };
    }
446101
public boolean validate() {
        _validationError = null;
        List<XmlError> errors = new ArrayList<XmlError>();

        boolean valid = _xmlBean.validate(new XmlOptions().setErrorListener(errors));
        if (!valid) {
            _validationError = "";
            for (int i = 0; i < errors.size(); i++) {
                _validationError += errors.get(i).toString();
                if (i < errors.size() - 1)
                    _validationError += '\n';
            }
        }

        return valid;
    }
441037
public String create()
   {
      StringBuffer strEditor = new StringBuffer();

      strEditor.append("<div>");
      String encodedValue = HTMLEncode(value);

      if (isCompatible())
      {

         strEditor.append("<input type=\"hidden\" id=\"" + instanceName + "\" name=\"" + instanceName + "\" value=\""
            + encodedValue + "\">");

         strEditor.append(createConfigHTML());
         strEditor.append(createIFrameHTML());

      }
      else
      {
         strEditor.append("<TEXTAREA name=\"" + instanceName + "\" rows=\"4\" cols=\"40\" style=\"WIDTH: " + width
            + "; HEIGHT: " + height + "\" wrap=\"virtual\">" + encodedValue + "</TEXTAREA>");
      }
      strEditor.append("</div>");
      return strEditor.toString();
   }
1177677
public String getErrorMessage() {

        StringBuffer result = new StringBuffer(512);

        String reason = m_messages.key(Messages.GUI_REASON_0, new Object[] {});

        if (CmsStringUtil.isNotEmpty(m_errorMessage)) {
            result.append(m_errorMessage);
            result.append("\n").append(reason).append(": ");
        }

        // if a localized message is already set as a parameter, append it.
        result.append(getMessage(m_throwable));
        // recursively append all error reasons to the message
        for (Throwable cause = m_throwable.getCause(); cause != null; cause = cause.getCause()) {
            result.append("\n").append(reason).append(": ");
            result.append(getMessage(cause));
        }
        return result.toString();
    }