Creates a new error message.
@param what the what part of the message (what has happened)
@param obj objects to add to the message
@return new information message
547800
public static Message5WH createErrorMessage(String what, Object ... obj){
		return new Message5WH_Builder().addWhat(FormattingTupleWrapper.create(what, obj)).setType(E_MessageType.ERROR).build();
	}
825064
public static ObjectResult newErrorResult(String errMsg, String objID) {
        ObjectResult result = new ObjectResult();
        result.setStatus(Status.ERROR);
        result.setErrorMessage(errMsg);
        if (!Utils.isEmpty(objID)) {
            result.setObjectID(objID);
        }
        return result;
    }
157798
public JsJmsMessage createJmsMessage() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createJmsMessage");
    JsJmsMessage msg = null;
    try {
      msg = new JsJmsMessageImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createJmsMessage");
    return msg;
  }
1064013
function JModelError(obj) {
    this.message = obj['message'];
    this.propertyName = obj['propertyName'];

    Error.call(this);
    Error.captureStackTrace(this, this.constructor);
}
221040
public static ErrorDescription create(ApplicationException ex) {
    	ErrorDescription description = new ErrorDescription();
    	description.setCategory(ex.getCategory());
    	description.setStatus(ex.getStatus());
    	description.setCode(ex.getCode());
    	description.setMessage(ex.getMessage());
    	description.setDetails(ex.getDetails());
    	description.setCorrelationId(ex.getCorrelationId());    	
    	description.setCause(ex.getCauseString());    	
    	description.setStackTrace(ex.getStackTraceString());    	
    	return description;
    }
110134
@SuppressWarnings("unchecked") 
   private static void error(Object o, Throwable t)
   {
      if (logging != null)
      {
         try
         {
            Class<?> clz = logging.getClass();
            Method mError = clz.getMethod("error", Object.class, Throwable.class);
            mError.invoke(logging, new Object[] {o, t});
         }
         catch (Throwable th)
         {
            // Nothing we can do
         }
      }
      else
      {
         if (o != null)
            System.out.println(o.toString());

         if (t != null)
            t.printStackTrace(System.out);
      }
   }
696976
@NotNull
	public static JSONAPIDocument<?> createErrorDocument(Iterable<? extends Error> errors) {
		JSONAPIDocument<?> result = new JSONAPIDocument();
		result.errors = errors;
		return result;
	}
1048872
@SuppressWarnings({"ThrowableResultOfMethodCallIgnored", "unchecked"})
    public static <X extends Throwable> X create(
            @Nonnull ExMF<X> exceptionFactory,
            @Nonnull String newMessage, @Nullable Object... messageParams) {

        String message = constructMessage(null, newMessage, messageParams);
        return exceptionFactory.produce(message);
    }
1093089
public JsJmsBytesMessage createJmsBytesMessage() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createJmsBytesMessage");
    JsJmsBytesMessage msg = null;
    try {
      msg = new JsJmsBytesMessageImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createJmsBytesMessage");
    return msg;
  }
62867
function error (message, error) {
    // build custom error message
    message = `${this.model.name}#${this.id} record error` + (
        typeof message === 'string'
            ? `: ${message}`
            : ''
    )
    // use error object passed in
    if (defined(error)) {
        // create data object with original message
        error.data = {
            message: error.message,
        }
    }
    // create new error message
    else {
        error = new Error(message)
        error.data = {}
    }
    // set record data for error
    error.data.record = this

    return error
}
138059
function ( obj, errorMsg ) {
            var result = Object.prototype.toString.call( obj ) === '[object Object]';
    
            if ( errorMsg && !result ) {
                warning( errorMsg );
                return false;
            } else {
                return result;
            }
        }
626451
@Override
    public void visitCode(Code obj) {
        Method m = getMethod();

        if (m.isSynthetic()) {
            return;
        }

        String signature = m.getSignature();
        if (!signature.endsWith(")Ljava/lang/Object;")) {
            return;
        }
        stack.resetForMethodEntry(this);
        returnTypes.clear();
        super.visitCode(obj);
        if (returnTypes.size() <= 1) {
            return;
        }
        String methodName = m.getName();
        try {
            boolean isInherited = SignatureUtils.isInheritedMethod(currentClass, methodName, signature);

            int priority = NORMAL_PRIORITY;
            for (JavaClass cls : returnTypes.keySet()) {
                if ((cls != null) && Values.DOTTED_JAVA_LANG_OBJECT.equals(cls.getClassName())) {
                    priority = LOW_PRIORITY;
                    break;
                }
            }

            JavaClass cls = findCommonType(returnTypes.keySet());
            BugInstance bug;
            if (isInherited) {
                bug = new BugInstance(this, BugType.URV_INHERITED_METHOD_WITH_RELATED_TYPES.name(), priority).addClass(this).addMethod(this);
                if (cls != null) {
                    bug.addString(cls.getClassName());
                }
            } else if (cls == null) {
                bug = new BugInstance(this, BugType.URV_UNRELATED_RETURN_VALUES.name(), priority).addClass(this).addMethod(this);
            } else {
                bug = new BugInstance(this, BugType.URV_CHANGE_RETURN_TYPE.name(), priority).addClass(this).addMethod(this);
                bug.addString(cls.getClassName());
            }
            for (Integer pc : returnTypes.values()) {
                bug.addSourceLine(this, pc.intValue());
            }
            bugReporter.reportBug(bug);
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        }
    }
585241
@Override
    public void error(String code, Object... arguments)
        throws NullPointerException, IllegalArgumentException {

        this.store.add(Level.ERROR, resolveMessage(code, arguments));
    }
982318
public JsJmsObjectMessage createJmsObjectMessage() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createJmsObjectMessage");
    JsJmsObjectMessage msg = null;
    try {
      msg = new JsJmsObjectMessageImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createJmsObjectMessage");
    return msg;
  }
947521
private String buildValidationErrorMessage(String message, Object expectedValue, Object actualValue) {
        return message + ", expected '" + expectedValue + "' but was '" + actualValue + "'";
    }
786304
function formErrorText (info, msg) {
  const hr = '----------'

  return addPlatformInformation(info)
  .then((obj) => {
    const formatted = []

    function add (msg) {
      formatted.push(
        stripIndents(msg)
      )
    }

    add(`
      ${obj.description}

      ${obj.solution}

    `)

    if (msg) {
      add(`
        ${hr}

        ${msg}

      `)
    }

    add(`
      ${hr}

      ${obj.platform}
    `)

    if (obj.footer) {
      add(`

        ${hr}

        ${obj.footer}
      `)
    }

    return formatted.join('\n\n')
  })
}
994197
private JsonRpcClientException createJsonRpcClientException(ObjectNode errorObject) {
		int code = errorObject.has(JsonRpcBasicServer.ERROR_CODE) ? errorObject.get(JsonRpcBasicServer.ERROR_CODE).asInt() : 0;
		return new JsonRpcClientException(code, errorObject.get(JsonRpcBasicServer.ERROR_MESSAGE).asText(), errorObject.get(JsonRpcBasicServer.DATA));
	}