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

Function checkError

lib/internal/streams/destroy.js:33–45  ·  view source on GitHub ↗
(err, w, r)

Source from the content-addressed store, hash-verified

31const kConstruct = Symbol('kConstruct');
32
33function checkError(err, w, r) {
34 if (err) {
35 // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364
36 err.stack; // eslint-disable-line no-unused-expressions
37
38 if (w && !w.errored) {
39 w.errored = err;
40 }
41 if (r && !r.errored) {
42 r.errored = err;
43 }
44 }
45}
46
47// Backwards compat. cb() is undocumented and unused in core but
48// unfortunately might be used by modules.

Callers 2

destroyFunction · 0.70
onDestroyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected