MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / onError

Function onError

public/javascripts/require.js:525–548  ·  view source on GitHub ↗
(err, errback)

Source from the content-addressed store, hash-verified

523 }
524
525 function onError(err, errback) {
526 var ids = err.requireModules,
527 notified = false;
528
529 if (errback) {
530 errback(err);
531 } else {
532 each(ids, function (id) {
533 var mod = getOwn(registry, id);
534 if (mod) {
535 //Set error on module, so it skips timeout checks.
536 mod.error = err;
537 if (mod.events.error) {
538 notified = true;
539 mod.emit('error', err);
540 }
541 }
542 });
543
544 if (!notified) {
545 req.onError(err);
546 }
547 }
548 }
549
550 /**
551 * Internal method to transfer globalQueue items to this context's

Callers 4

checkLoadedFunction · 0.85
newContextFunction · 0.85
intakeDefinesFunction · 0.85
localRequireFunction · 0.85

Calls 2

eachFunction · 0.85
getOwnFunction · 0.85

Tested by

no test coverage detected