Viv JavaScript Runtime - v0.10.2
    Preparing search index...

    Class VivInterpreterError

    Error thrown when the Viv interpreter fails to evaluate an expression.

    These errors occur due to authoring issues in the compiled content bundle that cannot be detected at compilation time, because they depend on the live simulation state. Usually the cause is some kind of type issue, such an array access where the key expression does not evaluate to an integer.

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructs a new VivInterpreterError.

      Parameters

      • msg: string

        A human-readable summary of the failure.

      • expression: Expression

        The Viv expression at hand when the failure occurred.

      • context: EvaluationContext

        The evaluation context at hand when the failure occurred.

      • OptionalextraContext: Record<string, unknown>

        If applicable, an object containing additional context, such as the evaluations of certain fields or intermediate concerns.

      • OptionalexternalCause: unknown

        If applicable, the external exception that caused the interpreter failure.

      Returns VivInterpreterError

    Properties

    evaluationContext: EvaluationContext

    The evaluation context at hand when the failure occurred.

    expression: Expression

    The Viv expression at hand when the failure occurred.

    name: VivErrorName = VivErrorName.VivInterpreterError

    The name for a VivInterpreterError.

    externalCause?: unknown

    If applicable, an exception that caused the interpreter failure that is external in origin, due to originating in a call to a CustomFunction exposed in the host-application adapter.

    extraContext?: Record<string, unknown>

    If applicable, an object containing additional context, such as the evaluations of certain fields or intermediate concerns.

    The key names used here will be descriptive.

    Methods

    • A custom inspect handler that produces a human-readable summary of the error.

      This handler will be invoked when the error is displayed in Node via console.log, console.error, util.inspect, or its uncaught-exception output.

      Note: This method only controls the display format. The structured properties will remain available for programmatic access.

      Parameters

      • depth: number

        The current recursion depth in the Node inspect call.

      • options: { colors: boolean }

        The Node inspect options (used to determine whether colors are enabled).

      Returns string

      A formatted string summarizing the error.