Creates an error describing a problem with the compiler itself - such
as a broken invariant - that must be fixed within the compiler.
18904
function createCompilerError(
  message: string,
  locations?: ?$ReadOnlyArray<Location>,
  nodes?: ?$ReadOnlyArray<ASTNode>,
): CompilerError {
  let messageWithLocations = message;
  if (locations != null) {
    const printedLocations = printLocations(locations);
    messageWithLocations =
      printedLocations.length === 0
        ? message
        : [message, ...printedLocations].join('\n\n') + '\n';
  }
  const error = new GraphQLError(
    `Internal Error: ${messageWithLocations}`,
    nodes ?? [],
  );
  return new Error(error.message);
}
351023
public static DiagnosticType error(String name, String descriptionFormat) {
    return make(name, CheckLevel.ERROR, descriptionFormat);
  }
95854
function toError(msg, cause) {
  var err = new Error(msg);
  err.cause = cause;
  return err;
}
437011
function buildError(err, hackErr) {
  var stack1 = err.stack;
  var stack2 = hackErr.stack;
  var label = hackErr.label;

  var stack = [];

  stack1.split('\n').forEach(function(line, index, arr) {
    if (line.match(/^    at GeneratorFunctionPrototype.next/)) {
      stack = stack.concat(arr.slice(0, index));
      return;
    }
  });

  stack = stack.concat(stack2.split('\n').slice(2));
  if (!stack[0].match(/^Error:/)) {
    stack.unshift(err.message);
  }
  if (!!label) {
    stack.unshift('[DEBUG: ' + label + ']');
  }
  stack = stack.join('\n');

  var newError = new Error();
  newError.message = err.message;
  newError.stack = stack;

  return newError;
}
1109294
def fix_call(callable, *args, **kw):
    
    try:
        val = callable(*args, **kw)
    except TypeError:
        exc_info = fix_type_error(None, callable, args, kw)
        reraise(*exc_info)
    return val
254357
def add_error(self, error, critical=False):
    
    self.errors.append((error, critical))
206591
function addError(data, error) {
	if (!data.error) {
		data.error = [];
	}
	error.lineNumber = data.lineNumber;
	data.error.push(error);
}
1066611
function AbstractCliError(message, statusCode) {
	Error.call(this, message, statusCode);
	Error.captureStackTrace(this, AbstractCliError);

	this.message = message || this.message
}
1292524
function ObsessedError(message, errors) {
  Error.captureStackTrace(this, ObsessedError);
  this.message = this.combine(message, errors);
}
1093548
public B error() {
    ErrorEventDefinition errorEventDefinition = createInstance(ErrorEventDefinition.class);
    element.getEventDefinitions().add(errorEventDefinition);

    return myself;
  }
566704
function error (message, error) {
    // get model name
    var modelName = defined(this) && defined(this.name) ? this.name : 'ImmutableCoreModel'
    // build custom error message
    message = `${modelName} error` + (
        typeof message === 'string'
            ? `: ${message}`
            : ''
    )
    // use error object passed in
    if (defined(error)) {
        // create data object with original message
        error.data = {
            error: {
                code: error.code,
                message: error.message,
            },
        }
    }
    // create new error message
    else {
        error = new Error(message)
        error.data = {}
    }

    return error
}
71080
public void addError(String message, int sourceStart, int sourceEnd) {
		ast.addProblem(ast.new ParseProblem(false, message, sourceStart, sourceEnd));
	}
1277797
void error(int pos, String key, Object ... args) {
        log.error(DiagnosticFlag.SYNTAX, pos, key, args);
    }
100851
function WrapperError(message, innerError) {
  // supports instantiating the object without the new keyword
  if (!(this instanceof WrapperError)) {
    return new WrapperError(message, innerError);
  }

  Error.call(this);
  Error.captureStackTrace(this, WrapperError);

  this.message = message;
  this.innerError = innerError;
}
189780
def raise_error(e):
    """"""
    code = e.error
    if code in code_to_class:
        raise code_to_class[code](e.error_description)
    else:
        raise InternalServerError(e.error_description)
1295988
public void addError(String text, CSTNode context, SourceUnit source) throws CompilationFailedException {
        addError(new LocatedMessage(text, context, source));
    }
50433
public static void addBindingUpdateError( ServletRequest request, String expression, String message, Throwable cause )
    {
        Map errors = ( Map ) request.getAttribute( BINDING_UPDATE_ERRORS_ATTR );

        if ( errors == null )
        {
            errors = new LinkedHashMap();
            request.setAttribute( BINDING_UPDATE_ERRORS_ATTR, errors );
        }

        errors.put( expression, new BindingUpdateError( expression, message, cause ) );
    }