Skip to main content

Function: parseError()

parseError(error, type?): Promise<ParsedErrorData>

Defined in: cliUtils.ts:124

Formats provided error object into readable format including the errored source code fragment with line highlight. Works with runtime and compile errors while trying to show all relevant information that can be extracted from provided object.

Parameters​

error​

StatsError | Error

type?​

Error type (affects error parsing).

"compile" | "runtime"

Returns​

Promise<ParsedErrorData>

Formatted error output.