Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

sentry / @nestjs/core   js

Repository URL to install this package:

Version: 7.0.10 

/ helpers / external-proxy.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const execution_context_host_1 = require("../helpers/execution-context-host");
class ExternalErrorProxy {
    createProxy(targetCallback, exceptionsHandler, type) {
        return async (...args) => {
            try {
                return await targetCallback(...args);
            }
            catch (e) {
                const host = new execution_context_host_1.ExecutionContextHost(args);
                host.setType(type);
                return exceptionsHandler.next(e, host);
            }
        };
    }
}
exports.ExternalErrorProxy = ExternalErrorProxy;