()
| 450 | } |
| 451 | |
| 452 | function setupPrepareStackTrace() { |
| 453 | const { |
| 454 | setEnhanceStackForFatalException, |
| 455 | setPrepareStackTraceCallback, |
| 456 | } = internalBinding('errors'); |
| 457 | const { |
| 458 | prepareStackTraceCallback, |
| 459 | ErrorPrepareStackTrace, |
| 460 | fatalExceptionStackEnhancers: { |
| 461 | beforeInspector, |
| 462 | afterInspector, |
| 463 | }, |
| 464 | } = requireBuiltin('internal/errors'); |
| 465 | // Tell our PrepareStackTraceCallback passed to the V8 API |
| 466 | // to call prepareStackTrace(). |
| 467 | setPrepareStackTraceCallback(prepareStackTraceCallback); |
| 468 | // Set the function used to enhance the error stack for printing |
| 469 | setEnhanceStackForFatalException(beforeInspector, afterInspector); |
| 470 | // Setup the default Error.prepareStackTrace. |
| 471 | ObjectDefineProperty(Error, 'prepareStackTrace', { |
| 472 | __proto__: null, |
| 473 | writable: true, |
| 474 | enumerable: false, |
| 475 | configurable: true, |
| 476 | value: ErrorPrepareStackTrace, |
| 477 | }); |
| 478 | } |
| 479 | |
| 480 | // Store the internal loaders in C++. |
| 481 | setInternalLoaders(internalBinding, requireBuiltin); |
no test coverage detected
searching dependent graphs…