lib/full_stack.js
function wrapCallback( fn, frameLocation ) {
  const traceError = new Error();
  traceError.__location = frameLocation;
  traceError.__previous = currentTraceError;

  return function $wrappedCallback( ...args ) {
    currentTraceError = traceError;
    try {
      return fn.call( this, ...args );
    } catch ( e ) {
      throw e; // we just need the the 'finally'
    } finally {
      currentTraceError = null;
    }
  };
}
function wrapCallback( fn, frameLocation ) {
  const traceError = new Error();
  traceError.__location = frameLocation;
  traceError.__previous = currentTraceError;

  return function $wrappedCallback( ...args ) {
    currentTraceError = traceError;
    try {
      return fn.call( this, ...args );
    } catch ( e ) {
      throw e; // we just need the the 'finally'
    } finally {
      currentTraceError = null;
    }
  };
}
function wrapCallback ( fn , frameLocation ) { const traceError = new Error ( ) ; traceError . __location = frameLocation ; traceError . __previous = currentTraceError ; return function $wrappedCallback ( ... args ) { currentTraceError = traceError ; try { return fn . call ( this , ... args ) ; } catch ( e ) { throw e ; // we just need the the 'finally' } finally { currentTraceError = null ; } } ; }
Wrap given callback access its original trace

@param {function} fn Callback function
@param {String} frameLocation Code point where this callback was called. Eg. "MyClass.method"
Wrap given callback access its original trace