MCPcopy Index your code
hub / github.com/RisingStack/trace-nodejs / wrappedCallback

Function wrappedCallback

lib/instrumentations/utils/wrapQuery.js:75–80  ·  view source on GitHub ↗
(original)

Source from the content-addressed store, hash-verified

73function wrapCallback (original, args, reporter) {
74 var cs
75 var wrappedCallback = function (original) {
76 return function (err) {
77 reporter.reportReceive(err, cs)
78 return original.apply(this, arguments)
79 }
80 }
81 var last = args[args.length - 1]
82 if (last && typeof last === 'function') {
83 args[args.length - 1] = wrappedCallback(last)

Callers 1

wrapCallbackFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected