(err, errback)
| 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 |
no test coverage detected