amis-rpc-design/node_modules/core-js/internals/error-stack-install.js
2023-10-07 19:42:30 +08:00

15 lines
564 B
JavaScript

'use strict';
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var clearErrorStack = require('../internals/error-stack-clear');
var ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable');
// non-standard V8
var captureStackTrace = Error.captureStackTrace;
module.exports = function (error, C, stack, dropEntries) {
if (ERROR_STACK_INSTALLABLE) {
if (captureStackTrace) captureStackTrace(error, C);
else createNonEnumerableProperty(error, 'stack', clearErrorStack(stack, dropEntries));
}
};