Exception: Kobako::TrapError
- 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).
Two named subclasses cover the configured per-invocation caps:
* {TimeoutError} — wall-clock +timeout+ exceeded.
* {MemoryLimitError} — guest +memory.grow+ would exceed
+memory_limit+.
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.