# `Cartouche.VM.InvalidVm`
[🔗](https://github.com/zenhive/cartouche/blob/main/lib/cartouche/vm.ex#L1129)

Raised by `Cartouche.VM.exec/3` (and friends) when the EVM run terminates
in a non-recoverable error state — e.g. invalid opcode, stack underflow,
or unhandled exception inside an opcode handler.

Public callers can `rescue Cartouche.VM.InvalidVm` to handle these.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
