Logs a lexer error message to the console along with the surrounding
characters.

@param {string} message
@param {string} input
@param {number} index
766881
function lexError(message, input, index) {
	let lexMessage = message + "\n\n";

	// Show input characters surrounding the source of the error.
	for (
		let i = Math.max(0, index - 16);
		i < Math.min(index + 16, input.length);
		i++
	) {
		lexMessage += input[i];
	}

	error(lexMessage);
}
130445
function log(isError, message, data){
    if(self.verbose || isError){
      if(data) console.log(self.type + ': ' + message, data);
      else console.log(self.type + message);
    }
  }
609501
function error() {
	var msg = util.format.apply(null, Array.prototype.slice.call(arguments, 0));
	write(msg, clc.red);
}
388006
public void error(String message, Object... args) {
    error(String.format(message, args), getThrowable(args));
  }
670391
function logError (failure, index) {
  index = index + 1

  if (index > 1) {
    log('\n\n')
  }

  log('  ' + index + ') ' + failure.description + ': ')

  if (failure.environment) {
    log(('(' + failure.environment + ')').grey)
  }

  log('\n\n')

  // Log the actual error message / stack trace / diffs
  var intend = 4 + String(index).length
  var error = formatError(failure.error, intend)

  if (!_empty(error.message)) {
    log(error.message + '\n')
  }

  if (!_empty(error.stack)) {
    log('\n' + error.stack.grey + '\n')
  }
}
926571
function expressResponseError(response, error, message) {
  let errorMessage = "there was an error in the request";
  if(message)
    errorMessage = message
  response.json({ success: false, error: errorMessage });
  console.error(error);
}
421521
protected void logInternalError(String message) {
		if (this.log.isLoggable(Level.FINEST) && !Strings.isNullOrEmpty(message)) {
			this.log.log(Level.FINEST,
					MessageFormat.format(Messages.SARLJvmModelInferrer_1,
							Messages.SARLJvmModelInferrer_0, message));
		}
	}
942752
function( text, index, character ) {
			if(text && text.length > index){
			   return text.substr(0, index) + character + text.substr(index+character.length);
			}else{
				return text;
			}
		}
1276124
function ParserError(message, spark) {
  Error.captureStackTrace(this, this.constructor);

  this.message = message;
  this.name = this.constructor.name;

  if (spark) {
    if (spark.listeners('error').length) spark.emit('error', this);
    spark.primus.emit('log', 'error', this);
  }
}
656479
public void error(String message) {
        if (loggingService == null) {
            System.err.println(message);
            return;
        }
        loggingService.error(pluginId, loggerName, message);
    }
1071454
@Override
    public void handleError(Source source, int line, int column,
            String msg)
            throws LexerException {
        errors++;
        print(source.getName() + ":" + line + ":" + column
                + ": error: " + msg);
    }
125682
function issue(value, fromIndex) {
  var index = fromIndex
  var length = value.length

  while (index < length) {
    if (!decimal(value.charCodeAt(index))) {
      break
    }

    index++
  }

  if (index - fromIndex === 0) {
    return -1
  }

  return index
}
1235368
function logError(message, err, context, event) {
  var current_err = err;
  while (current_err) {
    var next_err = current_err._previous;
    delete current_err._previous;
    if (current_err.stack) {
      console.error(current_err.stack);
    } else {
      console.error(current_err);
    }
    current_err = next_err;
  }
  // TODO add cli options for logging out context and event as well
}
305683
protected String handleError(final String message) {
        notifier().error(formatMessage(message));
        return formatMessage(message);
    }
48336
function warning(message) {
  /* eslint-disable no-console */
  if (typeof console !== 'undefined' && typeof console.error === 'function') {
    console.error(message);
  }
  /* eslint-enable no-console */
  try {
    // This error was thrown as a convenience so that if you enable
    // "break on all exceptions" in your console,
    // it would pause the execution at this line.
    throw new Error(message);
    /* eslint-disable no-empty */
  } catch (e) {}
  /* eslint-enable no-empty */
}
197730
function message (text) {
    const normalText = text.toLowerCase();

    if (~normalText.indexOf('warning')) {
        log.warn(text)
    } else if (~normalText.indexOf('error')) {
        log.error(text);
    } else {
        log.debug(text);
    }
}
285017
function(inputIndex) {

            _.each(tokens, function(token, index) {
                // determain whether or not this is a file reference or a string
                if(token.file) {

                    // read the file and reset replacement to what was loaded
                    fs.readFile(token.file, 'utf8', function(e, data) {
                        if(e) {
                            grunt.fail.warn("There was an error processing the replacement '" + token.file + "' file.");
                        }
                        tokens[index].contents = data;
                        processTokenCompleteCallback();
                    });

                } else if(token.string) {
                    // we didn't need to load a file
                    tokens[index].contents = token.string;
                    processTokenCompleteCallback();
                } else {
                    processTokenCompleteCallback();
                }

            }, this);
        }