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

    Class VivExecutionError

    Error thrown when something goes wrong during Viv runtime execution.

    This includes failures in the interpreter, role caster, planner, and other subsystems that act on compiled Viv content. Generally, such failures are caused by authoring errors in the compiled content bundle.

    While occasionally a VivExecutionError will be thrown directly, usually execution issues will cause a child error type to be thrown:

    Though certainly not ideal, execution errors may be recoverable in production, e.g., by skipping a problematic construct and logging a warning.

    Consumers who want to catch any execution-phase error can use instanceof VivExecutionError.

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructs a new VivExecutionError.

      Parameters

      • msg: string

        A human-readable summary of the failure.

      • OptionalextraContext: Record<string, unknown>

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

      Returns VivExecutionError

    Properties

    name: VivErrorName = VivErrorName.VivExecutionError

    The name for a VivExecutionError.

    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.