This error is used to explain why parsing failed.

Type Parameters

  • T

Hierarchy

  • Error
    • ParsingError

Constructors

  • Type Parameters

    • T

    Parameters

    • message: string
    • invalidReason: T

    Returns ParsingError<T>

Properties

invalidReason: T

This provides a programmatic way to access why parsing failed. Downstream devs might want to use this to build their own error messages if the default error messages are not suitable for their use case. This should be an enum.

message: string
name: string
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void