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

Commit

Permalink
[vm] reserve status code for future use
Browse files Browse the repository at this point in the history
  • Loading branch information
zekun000 authored and vgao1996 committed Mar 14, 2023
1 parent 134b745 commit 47bb636
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions language/move-core/types/src/vm_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,12 @@ pub enum StatusCode {
SEQUENCE_NONCE_INVALID = 29,
// There was an error when accessing chain-specific account information
CHAIN_ACCOUNT_INFO_DOES_NOT_EXIST = 30,
// Reserved error code for future use
RESERVED_VALIDATION_ERROR_1 = 31,
RESERVED_VALIDATION_ERROR_2 = 32,
RESERVED_VALIDATION_ERROR_3 = 33,
RESERVED_VALIDATION_ERROR_4 = 34,
RESERVED_VALIDATION_ERROR_5 = 35,

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

// Errors that can arise from binary decoding (deserialization)
// Deserializtion Errors: 3000-3999
Expand All @@ -676,6 +688,12 @@ pub enum StatusCode {
VALUE_DESERIALIZATION_ERROR = 3023,
CODE_DESERIALIZATION_ERROR = 3024,
INVALID_FLAG_BITS = 3025,
// Reserved error code for future use
RESERVED_DESERIALIZAION_ERROR_1 = 3026,
RESERVED_DESERIALIZAION_ERROR_2 = 3027,
RESERVED_DESERIALIZAION_ERROR_3 = 3028,
RESERVED_DESERIALIZAION_ERROR_4 = 3029,
RESERVED_DESERIALIZAION_ERROR_5 = 3030,

// Errors that can arise at runtime
// Runtime Errors: 4000-4999
Expand Down Expand Up @@ -703,6 +721,12 @@ pub enum StatusCode {
EXECUTION_LIMIT_REACHED = 4030,
IO_LIMIT_REACHED = 4031,
STORAGE_LIMIT_REACHED = 4032,
// Reserved error code for future use
RESERVED_RUNTIME_ERROR_1 = 4033,
RESERVED_RUNTIME_ERROR_2 = 4034,
RESERVED_RUNTIME_ERROR_3 = 4035,
RESERVED_RUNTIME_ERROR_4 = 4036,
RESERVED_RUNTIME_ERROR_5 = 4037,

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

0 comments on commit 47bb636

Please sign in to comment.