芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/@sentry/node/dist/stacktrace.js
/** * stack-trace - Parses node.js stack traces * * This was originally forked to fix this issue: * https://github.com/felixge/node-stack-trace/issues/31 * * Mar 19,2019 - #4fd379e * * https://github.com/felixge/node-stack-trace/ * @license MIT */ Object.defineProperty(exports, "__esModule", { value: true }); /** Extracts StackFrames from the Error */ function parse(err) { if (!err.stack) { return []; } var lines = err.stack.split('\n').slice(1); return lines .map(function (line) { if (line.match(/^\s*[-]{4,}$/)) { return { columnNumber: null, fileName: line, functionName: null, lineNumber: null, methodName: null, native: null, typeName: null, }; } var lineMatch = line.match(/at (?:(.+?)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/); if (!lineMatch) { return undefined; } var object = null; var method = null; var functionName = null; var typeName = null; var methodName = null; var isNative = lineMatch[5] === 'native'; if (lineMatch[1]) { functionName = lineMatch[1]; var methodStart = functionName.lastIndexOf('.'); if (functionName[methodStart - 1] === '.') { // eslint-disable-next-line no-plusplus methodStart--; } if (methodStart > 0) { object = functionName.substr(0, methodStart); method = functionName.substr(methodStart + 1); var objectEnd = object.indexOf('.Module'); if (objectEnd > 0) { functionName = functionName.substr(objectEnd + 1); object = object.substr(0, objectEnd); } } typeName = null; } if (method) { typeName = object; methodName = method; } if (method === '
') { methodName = null; functionName = null; } var properties = { columnNumber: parseInt(lineMatch[4], 10) || null, fileName: lineMatch[2] || null, functionName: functionName, lineNumber: parseInt(lineMatch[3], 10) || null, methodName: methodName, native: isNative, typeName: typeName, }; return properties; }) .filter(function (callSite) { return !!callSite; }); } exports.parse = parse; //# sourceMappingURL=stacktrace.js.map