-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Description
Hello Mysten,
I noticed this #[error(code = ...)] syntax in some framework modules. Example:
/// Tries to create an object twice with the same parent-key combination.
#[error(code = 0)]
const EObjectAlreadyExists: vector<u8> = b"Derived object is already claimed.";The clever errors I was used to didn't have any parameters, and indeed the move-book makes no mention of them.
Another source tells me that they've been changed as follows
The error bitset changed from this to this:
| tag (1-bit) | reserved (7-bits) | code (8-bits) | line_number (16-bits) | identifier_index (16-bits) | constant_index (16-bits) |
Would you like help editing the Clever Errors reference?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels