mapError
Get information about an error as a ready-to-print array. This includes the error name, message, and a call stack.
If --enable-stack-traces is specified during the build, the call stack
will be mapped using source maps. If --enable-stack-traces is specified
and --exclude-sources is not, this will also include a code dump of
neighboring lines of user code.
Parameters
- error: Error | string
The error to retrieve information about. If a string is provided, it is first converted to an
Error.
Returns
Array<Error | string>