main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
564 bytes
|
Rev | Line | |
---|
[d24f17c] | 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 |
|
---|
| 6 | // non-standard V8
|
---|
| 7 | var captureStackTrace = Error.captureStackTrace;
|
---|
| 8 |
|
---|
| 9 | module.exports = function (error, C, stack, dropEntries) {
|
---|
| 10 | if (ERROR_STACK_INSTALLABLE) {
|
---|
| 11 | if (captureStackTrace) captureStackTrace(error, C);
|
---|
| 12 | else createNonEnumerableProperty(error, 'stack', clearErrorStack(stack, dropEntries));
|
---|
| 13 | }
|
---|
| 14 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.