OptionalfilterFilter configuration passed to filterStack.
Same shape as the second argument of filterStack (e.g. include, exclude,
and preset: 'app-only' to trim node_modules/internals).
OptionalformatFormat configuration passed to formatStack.
OptionalonCallback invoked with processed frames and the originating Error.
The parsed and (optionally) filtered stack frames.
The original Error instance.
Options for installNodeErrorHooks.
Remarks
When a fatal error occurs in Node.js (an uncaught exception or an unhandled promise rejection), the stack is parsed into StackFrame objects, optionally filtered and formatted, then either passed to NodeHookOptions.onStack or printed (pretty) to
stderr.