docs: function makeWrappedCallback(callback, frameLocation) {
          // add a fake stack frame. we can't get a real one since we aren't inside the original function
          var traceError = new Error();
          traceError.__location = frameLocation;
          traceError.__previous = currentTraceError;
          return function() {
              // if (currentTraceError) {
              //     FIXME: This shouldn't normally happen, but it often does. Do we actually need a stack instead?
              //     console.warn("(long-stack-traces) Internal Error: currentTrace already set.");
              // }
              // restore the trace
              currentTraceError = traceError;
              try {
                  return callback.apply(this, arguments);
              } catch (e) {
                  console.error("Uncaught " + e.stack);
                  if (LST.rethrow)
                      throw ""; // TODO: throw the original error, or undefined?
              } finally {
                  // clear the trace so we can check that none is set above.
                  // TODO: could we remove this for slightly better performace?
                  currentTraceError = null;
              }
          }
      }