v8stack
is an npm package for accessing V8's error
stack traces.
Installation
npm install v8stack
Usage
// Import the `v8stack` packagevar v8stack = ; // Enable the capture of V8's stack tracesv8stack; // Access V8's stack trace of an error objectvar error = ;var errorStack = v8stack;console; // If wanted, the capture can be stoppedv8stack; // Beware that error stacks are evaluated lazily.// Evaluation can be triggered by calling `v8stack.get(error)`// or by evaluating `error.stack`.// After invoking `v8stack.disable()`, calls to `v8stack.evaluate(error)`// with errors whose stack evaluation hasn't been trigerred// will return 'undefined'.