AIP Discussion
This AIP extends the Move abort mechanism to support optional, user-facing abort messages. These messages are persisted as part of the transaction execution and surfaced through APIs and developer tooling.
The proposal introduces:
-
A new bytecode instruction AbortMsg that aborts with:
- an error code (
u64), and
- an error message (
vector<u8>) interpreted as an UTF-8 string,
taken from the operand stack.
-
An extension to the Move language abort syntax to accept an error message instead of an error code.
-
An extension to the assert! macro to accept formatted messages.
-
New assert_eq! and assert_ne! macros with Rust-like semantics, i.e., evaluate each argument exactly once and, on failure, abort with a descriptive message that identifies the values involved.
All changes are backward compatible. Abort messages are optional and do not replace abort codes.
Read more about it here: https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-138.md
AIP Discussion
This AIP extends the Move abort mechanism to support optional, user-facing abort messages. These messages are persisted as part of the transaction execution and surfaced through APIs and developer tooling.
The proposal introduces:
A new bytecode instruction
AbortMsgthat aborts with:u64), andvector<u8>) interpreted as an UTF-8 string,taken from the operand stack.
An extension to the Move language
abortsyntax to accept an error message instead of an error code.An extension to the
assert!macro to accept formatted messages.New
assert_eq!andassert_ne!macros with Rust-like semantics, i.e., evaluate each argument exactly once and, on failure, abort with a descriptive message that identifies the values involved.All changes are backward compatible. Abort messages are optional and do not replace abort codes.
Read more about it here: https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-138.md