The AVM uses a compositional error type that mirrors the instruction set layers.
Each instruction family has its own error enum, composed into the top-level
AVMError.
AVMError
├── PureLayerError
│ ├── TxLayerError
│ │ ├── BaseError
│ │ │ ├── ObjError
│ │ │ ├── IntrospectError
│ │ │ ├── ReflectError
│ │ │ └── ReifyError
│ │ └── TxError
│ └── PureError
├── MachineError
├── ControllerError
├── FdError
└── NondetError
Any leaf error can be converted to AVMError with ? thanks to From
implementations.
Variant When
NotFound(id)Object doesn’t exist in store or pending creates
AlreadyDestroyed(id)Object was already marked for destruction
AlreadyExists(id)Duplicate creation
RejectedCall(id)Object’s behavior rejected the input
MetadataCorruption(id)Metadata store is inconsistent
Variant When
Conflict(id)Read set validation failed at commit
NotFound(id)Transaction ID doesn’t match active tx
NoActiveTxCommit/abort without begin
InvalidDuringTxNested begin_tx or teleport during tx
Variant When
Unreachable(id)Target machine is unreachable
TeleportDuringTxTeleport attempted inside a transaction
Variant When
NotAvailable(id)Object doesn’t exist for transfer
NoController(id)Object has no controller for freeze
UnauthorizedTransfer(id)Transfer not permitted