Creates the html code for the given error message and the
provided Exception.<p>

@param errorMsg the error message to place in the html code
@param t the exception to add to the error message

@return the html code for the error message
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());
    }
139568
public static <T extends CharSequence> T validateMac(T value, String errorMsg) throws ValidateException {
		if (false == isMac(value)) {
			throw new ValidateException(errorMsg);
		}
		return value;
	}
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();
    }
556108
public static CompilationFailedException create(final IMessage[] errors) {

        final StringBuilder sb = new StringBuilder();
        sb.append("AJC compiler errors:").append(LINE_SEPARATOR);
        for (final IMessage error : errors) {
            sb.append(error.toString()).append(LINE_SEPARATOR);
        }

        return new CompilationFailedException(sb.toString());
    }
572542
@JsonIgnore
	public static Message errorMessage(String detailMessage) {
		Message message = new Message();
		message.setDetailMessage(detailMessage);
		message.setSeverity("ERROR");
		message.setType("");
		return message;
	}
295506
protected void dbg(String msg, Throwable t) {
        System.out.println(msg + (t != null ? ("\n" + t.getMessage()) : "")
                + (t != null ? ("\n" + t.getStackTrace()) : ""));
    }
168919
public void error( String msg, Throwable t )
    {
        if( m_delegate.isErrorEnabled() )
        {
            m_delegate.error( msg, t );
        }
    }
1195972
public static <T extends CharSequence> T validateLowerCase(T value, String errorMsg) throws ValidateException {
		if (false == isLowerCase(value)) {
			throw new ValidateException(errorMsg);
		}
		return value;
	}
1307357
public HtmlEmailImpl setHtmlMsg(String aHtml) throws EmailException {
	if (StringUtil.isEmpty(aHtml)) {
	    throw new EmailException("Invalid message supplied");
	}
	this.html = aHtml;
	return this;
    }
966304
public void error(Object message, Throwable t)
    {
        getLogger().error(message.toString(), t);
    }
1117445
private static ErrorItem.Builder toErrorItemBuilderWithoutCause(final String logMessage, final Throwable t) {
		ErrorItem.Builder builder = ErrorItem.newBuilder();
		builder.message(toErrorItemMessage(logMessage, t.getMessage()));
		builder.errorType(t.getClass().getCanonicalName());
		
		List<TraceFrame> stackFrames = new ArrayList<TraceFrame>();
		
		StackTraceElement[] stackTrace = t.getStackTrace();
		
		if ((stackTrace != null) && (0 < stackTrace.length)) {
			StackTraceElement firstFrame = stackTrace[0];
			builder.sourceMethod(firstFrame.getClassName() + "." + firstFrame.getMethodName());
			
			for (int i = 0; i < stackTrace.length; ++i) {
				TraceFrame stackFrame = StackTraceElements.toTraceFrame(stackTrace[i]);
				stackFrames.add(stackFrame);
			}
		}
		
		builder.stackTrace(stackFrames);
		
		return builder;
	}
285294
public static <T extends CharSequence> T validateWord(T value, String errorMsg) throws ValidateException {
		if (false == isWord(value)) {
			throw new ValidateException(errorMsg);
		}
		return value;
	}
68461
@SuppressWarnings({"ThrowableInstanceNeverThrown"})
    public static HttpResponseException error(int code, String errorMessage) {
        return error(code,new Exception(errorMessage));
    }
657707
public void error(String msg, Object[] args)
  {

    String themsg = XSLMessages.createMessage(msg, args);

    throw new RuntimeException(XSLMessages.createMessage(
                                    XSLTErrorResources.ER_ELEMTEMPLATEELEM_ERR,
                                    new Object[]{ themsg }));
  }
823615
public JsMessage createInboundWebMessage(String data) throws MessageDecodeFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createInboundWebMessage", data);
    JsMessage message = WebJsMessageFactoryImpl.createInboundWebMessage(data);
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createInboundWebMessage", message);
    return message;
  }
686640
public static void error(String msg, Throwable t) {
        if (quietMode)
            return;

        System.err.println(ERR_PREFIX + msg);
        if (t != null) {
            t.printStackTrace();
        }
    }
160849
@Override
    public void error( F0<String> msg )
    {
        if ( compilerLogger.isErrorEnabled() )
        {
            String msgString = msg.apply();
            errors.append( msgString ).append( '\n' );
            compilerLogger.error( msgString );
        }
    }