Error
@param {String} className
@param {String} msg The message text (including arguments)
@param {String} msgText The message text (before arguments were replaced)
@param {Object} e The exception to format
510267
function (className, msg, msgText, e) {
                var message = this._formatClassName(className) + msg;
                var extraInfo = "";
                if (e) {
                    if (e.logDetails) {
                        e.logDetails();
                    }
                    var extraInfo = (e.name && e.message) ? (e.name + ": " + e.message) : e.toString();
                    var stack = e.stack;
                    if (stack) {
                        // sometimes the stack starts with the name and message, sometimes not
                        if (extraInfo === stack.substring(0, extraInfo.length)) {
                            extraInfo = stack;
                        } else {
                            extraInfo += "\n" + stack;
                        }
                    }
                    extraInfo = "\n" + extraInfo;
                }
                console.error(message + extraInfo);
            }
304681
public void error(Object format,Object... msg) {
		if (logger.isErrorEnabled()) {
			// check if the first message contains variables variables
			if (format.toString().contains("{")) {
				logger.error(format.toString(), msg);
			} else {
				logger.error(format.toString().concat(" ").concat(JKStringUtil.concat(msg)));
			}
		}
	}
235721
function errMessageFormat (showDiff, pos, title, msg, stack) {
  if (showDiff) {
    return format.red('  ' + pos + ') ' + title + ':\n' + msg) + format.gray('\n' + stack + '\n')
  }
  return format.red('  ' + pos + ') ' + title + ':\n') +
    format.white('     ' + msg) +
    format.white('\n' + stack + '\n')
}
893498
function error( message, errors ) {
      const trim = _ => _.replace( /^\s+/, '' ).replace( /\s+$/, '' );
      const ajvMessage = ajv.errorsText( errors, { dataVar: '' } );
      const error = new Error(
         `${message}: ${trim(ajvMessage)} ${JSON.stringify(errors.map(e => e.params))}`
      );
      error.name = 'ValidationError';
      error.errors = errors;
      return error;
   }
1265954
function _onError(event, error, msgData) {
        var message;

        // Sometimes error.message is undefined
        if (!error.message) {
            console.warn("Expected a non-empty string in error.message, got this instead:", error.message);
            message = JSON.stringify(error);
        } else {
            message = error.message;
        }

        // Remove "Uncaught" from the beginning to avoid the inspector popping up
        if (message && message.substr(0, 8) === "Uncaught") {
            message = message.substr(9);
        }

        // Additional information, like exactly which parameter could not be processed.
        var data = error.data;
        if (Array.isArray(data)) {
            message += "\n" + data.join("\n");
        }

        // Show the message, but include the error object for further information (e.g. error code)
        console.error(message, error, msgData);
    }
1302502
public static String makeUserMsg(final RecognitionException e, final String msg) {
        if (e instanceof NoViableAltException) {
            return msg.replace("no viable alternative at", "unrecognized");
        } else if (e instanceof UnwantedTokenException) {
            return msg.replace("extraneous input", "unexpected token");
        } else if (e instanceof MismatchedTokenException) {
            if (msg.contains("mismatched input '<EOF>'")) {
                return msg.replace("mismatched input '<EOF>' expecting", "reached end of file looking for");
            } else {
                return msg.replace("mismatched input", "unexpected token");
            }
        } else if (e instanceof EarlyExitException) {
            return msg.replace("required (...)+ loop did not match anything", "required tokens not found");
        } else if (e instanceof FailedPredicateException) {
            if (msg.contains("picture_string failed predicate: {Unbalanced parentheses}")) {
                return "Unbalanced parentheses in picture string";
            }
            if (msg.contains("PICTURE_PART failed predicate: {Contains invalid picture symbols}")) {
                return "Picture string contains invalid symbols";
            }
            if (msg.contains("PICTURE_PART failed predicate: {Syntax error in last picture clause}")) {
                return "Syntax error in last picture clause";
            }
            if (msg.contains("DATA_NAME failed predicate: {Syntax error in last clause}")) {
                return "Syntax error in last COBOL clause";
            }
        }
        return msg;
    }
1137079
function grammarSyntaxError(matchFailure) {
  var e = new Error();
  Object.defineProperty(e, 'message', {get: function() { return matchFailure.message; }});
  Object.defineProperty(e, 'shortMessage', {get: function() {
    return 'Expected ' + matchFailure.getExpectedText();
  }});
  e.interval = matchFailure.getInterval();
  return e;
}
107418
function ParseError(msg) {
  this.name = 'ParseError';
  this.message = msg;
  if (Error.captureStackTrace) {
    Error.captureStackTrace(this, ParseError);
  }
}
923143
public void e(String msg, Throwable tr) {
    println(LogLevel.ERROR, msg, tr);
  }
21036
public void error( Element e, String msg, Object... args ) {
        messager.printMessage( Diagnostic.Kind.ERROR, String.format( msg, args ), e );
    }
1323547
public void error( String format, Object arg )
    {
        if( m_delegate.isErrorEnabled() )
        {
            FormattingTuple tuple = MessageFormatter.format( format, arg );
            m_delegate.error( tuple.getMessage(), tuple.getThrowable() );
        }
    }
550911
function formatError(e) {
    if (!e.err) {
        return e.message
    }
    // PluginError
    if (typeof e.err.showStack === 'boolean') {
        return e.err.toString()
    }
    // Normal error
    if (e.err.stack) {
        return e.err.stack
    }
    // Unknown (string, number, etc.)
    return new Error(String(e.err)).stack
}
693940
function CoercionError(msg) {
  this.name = 'CoercionError'
  this.message = msg
  if (Error.captureStackTrace) {
    Error.captureStackTrace(this, CoercionError);
  }
}
319696
function MessageFormatter() {
  this.format = format;
  function format(result) {
    _.each(result, function(message) {
      console.log(message);
    });
  }
}
887627
@Override
    public void error(String msg, Throwable e) {
        log.logIfEnabled(FQCN, Level.ERROR, null, msg, e);
    }
246923
private void error(final Element source, final String msg) {
        this.processingEnv.getMessager().printMessage(Kind.ERROR, msg, source);
    }
202318
function RETSError(ReplyCode, ReplyText) {
    Error.call(this);
    // Strict mode doesn't like arguments.callee
    Error.captureStackTrace(this);
    this.codes = require('./codes');
    this.code = ReplyCode || null;
    this.name = 'RETSError';
    this.message = '';
    this.ReplyText = ReplyText || null;
    this.wrapper = {
        start: " - [ReplyText: ",
        end: "]"
    };
    if (typeof this.codes[this.code] !== 'undefined') {
        if (typeof this.codes[this.code][0] !== 'undefined') {
            this.message = this.codes[this.code][0];
        }
        if (this.ReplyText !== null) {
            this.message += this.wrapper.start + this.ReplyText + this.wrapper.end;
        }
    }
    this.description = this.message;
}