You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
564 B
14 lines
564 B
'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));
|
|
}
|
|
};
|
|
|