MCPcopy Index your code
hub / github.com/nodejs/node / onError

Function onError

lib/_http_incoming.js:471–479  ·  view source on GitHub ↗
(self, error, cb)

Source from the content-addressed store, hash-verified

469};
470
471function onError(self, error, cb) {
472 // This is to keep backward compatible behavior.
473 // An error is emitted only if there are listeners attached to the event.
474 if (self.listenerCount('error') === 0) {
475 cb();
476 } else {
477 cb(error);
478 }
479}
480
481module.exports = {
482 IncomingMessage,

Callers

nothing calls this directly

Calls 2

listenerCountMethod · 0.80
cbFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…