Skip to content
This repository was archived by the owner on May 4, 2024. It is now read-only.

Commit 47bb636

Browse files
zekun000vgao1996
authored andcommitted
[vm] reserve status code for future use
1 parent 134b745 commit 47bb636

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

language/move-core/types/src/vm_status.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,12 @@ pub enum StatusCode {
498498
SEQUENCE_NONCE_INVALID = 29,
499499
// There was an error when accessing chain-specific account information
500500
CHAIN_ACCOUNT_INFO_DOES_NOT_EXIST = 30,
501+
// Reserved error code for future use
502+
RESERVED_VALIDATION_ERROR_1 = 31,
503+
RESERVED_VALIDATION_ERROR_2 = 32,
504+
RESERVED_VALIDATION_ERROR_3 = 33,
505+
RESERVED_VALIDATION_ERROR_4 = 34,
506+
RESERVED_VALIDATION_ERROR_5 = 35,
501507

502508
// When a code module/script is published it is verified. These are the
503509
// possible errors that can arise from the verification process.
@@ -651,6 +657,12 @@ pub enum StatusCode {
651657
// Failed to resolve type due to linking being broken after verification
652658
TYPE_RESOLUTION_FAILURE = 2021,
653659
DUPLICATE_NATIVE_FUNCTION = 2022,
660+
// Reserved error code for future use
661+
RESERVED_INVARIANT_VIOLATION_ERROR_1 = 2023,
662+
RESERVED_INVARIANT_VIOLATION_ERROR_2 = 2024,
663+
RESERVED_INVARIANT_VIOLATION_ERROR_3 = 2025,
664+
RESERVED_INVARIANT_VIOLATION_ERROR_4 = 2026,
665+
RESERVED_INVARIANT_VIOLATION_ERROR_5 = 2027,
654666

655667
// Errors that can arise from binary decoding (deserialization)
656668
// Deserializtion Errors: 3000-3999
@@ -676,6 +688,12 @@ pub enum StatusCode {
676688
VALUE_DESERIALIZATION_ERROR = 3023,
677689
CODE_DESERIALIZATION_ERROR = 3024,
678690
INVALID_FLAG_BITS = 3025,
691+
// Reserved error code for future use
692+
RESERVED_DESERIALIZAION_ERROR_1 = 3026,
693+
RESERVED_DESERIALIZAION_ERROR_2 = 3027,
694+
RESERVED_DESERIALIZAION_ERROR_3 = 3028,
695+
RESERVED_DESERIALIZAION_ERROR_4 = 3029,
696+
RESERVED_DESERIALIZAION_ERROR_5 = 3030,
679697

680698
// Errors that can arise at runtime
681699
// Runtime Errors: 4000-4999
@@ -703,6 +721,12 @@ pub enum StatusCode {
703721
EXECUTION_LIMIT_REACHED = 4030,
704722
IO_LIMIT_REACHED = 4031,
705723
STORAGE_LIMIT_REACHED = 4032,
724+
// Reserved error code for future use
725+
RESERVED_RUNTIME_ERROR_1 = 4033,
726+
RESERVED_RUNTIME_ERROR_2 = 4034,
727+
RESERVED_RUNTIME_ERROR_3 = 4035,
728+
RESERVED_RUNTIME_ERROR_4 = 4036,
729+
RESERVED_RUNTIME_ERROR_5 = 4037,
706730

707731
// A reserved status to represent an unknown vm status.
708732
// this is std::u64::MAX, but we can't pattern match on that, so put the hardcoded value in

0 commit comments

Comments
 (0)