MCPcopy
hub / github.com/requirejs/requirejs / makeError

Function makeError

require.js:167–175  ·  view source on GitHub ↗

* Constructs an error with a pointer to an URL with more information. * @param {String} id the error ID that maps to an ID on a web page. * @param {String} message human readable error. * @param {Error} [err] the original error, if there is one. * * @returns {Error}

(id, msg, err, requireModules)

Source from the content-addressed store, hash-verified

165 * @returns {Error}
166 */
167 function makeError(id, msg, err, requireModules) {
168 var e = new Error(msg + '\nhttps://requirejs.org/docs/errors.html#' + id);
169 e.requireType = id;
170 e.requireModules = requireModules;
171 if (err) {
172 e.originalError = err;
173 }
174 return e;
175 }
176
177 if (typeof define !== 'undefined') {
178 //If a define is already in play via another AMD loader,

Callers 5

checkLoadedFunction · 0.85
newContextFunction · 0.85
intakeDefinesFunction · 0.85
localRequireFunction · 0.85
require.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…