9da9735d822c731006db32b88a1054225e244d5ef69878d94272da76d8f53f36a8d4bb2ea28c20a44c237a1df546c04a714f6d5430846a7b8f50419f7c9668 564 B

1234567891011121314
  1. 'use strict';
  2. var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
  3. var clearErrorStack = require('../internals/error-stack-clear');
  4. var ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable');
  5. // non-standard V8
  6. var captureStackTrace = Error.captureStackTrace;
  7. module.exports = function (error, C, stack, dropEntries) {
  8. if (ERROR_STACK_INSTALLABLE) {
  9. if (captureStackTrace) captureStackTrace(error, C);
  10. else createNonEnumerableProperty(error, 'stack', clearErrorStack(stack, dropEntries));
  11. }
  12. };