MCPcopy Index your code
hub / github.com/BloombergGraphics/whatiscode / throwError

Function throwError

scripts/libs/esprima.js:2051–2063  ·  view source on GitHub ↗
(messageFormat)

Source from the content-addressed store, hash-verified

2049 // Throw an exception
2050
2051 function throwError(messageFormat) {
2052 var args, msg;
2053
2054 args = Array.prototype.slice.call(arguments, 1);
2055 msg = messageFormat.replace(/%(\d)/g,
2056 function (whole, idx) {
2057 assert(idx < args.length, 'Message reference must be in range');
2058 return args[idx];
2059 }
2060 );
2061
2062 throw createError(lastLineNumber, lastIndex, msg);
2063 }
2064
2065 function tolerateError(messageFormat) {
2066 var args, msg, error;

Callers 7

parseRestElementFunction · 0.85
parseContinueStatementFunction · 0.85
parseBreakStatementFunction · 0.85
parseSwitchStatementFunction · 0.85
parseThrowStatementFunction · 0.85
parseTryStatementFunction · 0.85
parseStatementFunction · 0.85

Calls 2

assertFunction · 0.85
createErrorFunction · 0.85

Tested by

no test coverage detected