PiMath API
    Preparing search index...

    Class PiMathError

    Typed error hierarchy for PiMath.

    All PiMath errors extend PiMathError, so a consumer can catch every library error at once with catch (e) { if (e instanceof PiMathError) ... }, or discriminate a specific kind with instanceof ParseError, etc.

    The original error (e.g. piexpression's ParseError) is chained through the standard ES2022 cause option.

    Hierarchy (View Summary)

    Index
    • Parameters

      • message: string
      • Optionaloptions: ErrorOptions

      Returns PiMathError

    cause?: unknown
    message: string
    name: string
    stack?: string
    • Indicates whether the argument provided is a built-in Error instance or not.

      Parameters

      • error: unknown

      Returns error is Error