Exception: Kobako::TrapError

Inherits:
Error
  • Object
show all
Defined in:
lib/kobako/errors.rb

Overview

Wasm engine layer. Raised when the Wasm execution engine crashed (trap, OOM, unreachable) or when the wire layer detected a structural violation that signals a corrupted guest execution environment (zero-length OUTCOME_BUFFER, unknown outcome tag — SPEC E-02 / E-03).

Two named subclasses cover the configured per-run caps from B-01:

* {TimeoutError}     — wall-clock +timeout+ exceeded (E-19).
* {MemoryLimitError} — guest +memory.grow+ would exceed
                       +memory_limit+ (E-20).

Host Apps that only care about “guest is unrecoverable, discard the Sandbox” can rescue TrapError and ignore the subclass; Host Apps that want to surface a specific reason to operators can rescue the subclass first.

Direct Known Subclasses

MemoryLimitError, TimeoutError