MCPcopy
hub / github.com/jquery/esprima / createError

Method createError

src/error-handler.ts:49–56  ·  view source on GitHub ↗
(index: number, line: number, col: number, description: string)

Source from the content-addressed store, hash-verified

47 }
48
49 createError(index: number, line: number, col: number, description: string): Error {
50 const msg = 'Line ' + line + ': ' + description;
51 const error = this.constructError(msg, col);
52 error.index = index;
53 error.lineNumber = line;
54 error.description = description;
55 return error;
56 }
57
58 throwError(index: number, line: number, col: number, description: string): never {
59 throw this.createError(index, line, col, description);

Callers 4

throwErrorMethod · 0.95
tolerateErrorMethod · 0.95
throwErrorMethod · 0.80
unexpectedTokenErrorMethod · 0.80

Calls 1

constructErrorMethod · 0.95

Tested by

no test coverage detected