pub enum ErrorCode {
Show 47 variants
UnexpectedToken = 1_001,
UnexpectedEof = 1_002,
InvalidSyntax = 1_003,
MissingSemicolon = 1_004,
MissingBrace = 1_005,
InvalidNumber = 1_006,
InvalidString = 1_007,
InvalidIdentifier = 1_008,
UndefinedVariable = 2_001,
TypeMismatch = 2_002,
DuplicateDefinition = 2_003,
UndefinedFunction = 2_004,
UndefinedType = 2_005,
InvalidAssignment = 2_006,
ImmutableModification = 2_007,
VisibilityError = 2_008,
InvalidOverride = 2_009,
MissingReturn = 2_010,
UnreachableCode = 2_011,
UnusedVariable = 2_012,
UnusedFunction = 2_013,
ShadowedVariable = 2_014,
InvalidModifier = 2_015,
IntegerOverflow = 2_501,
IntegerUnderflow = 2_502,
DivisionByZero = 2_503,
ArrayOutOfBounds = 2_504,
InvalidCast = 2_505,
NullReference = 2_506,
UnsupportedFeature = 3_001,
InvalidBytecode = 3_002,
StackOverflow = 3_003,
GasLimitExceeded = 3_004,
ContractTooLarge = 3_005,
InvalidOpcode = 3_006,
BreakOutsideLoop = 3_007,
ContinueOutsideLoop = 3_008,
InvalidJumpOffset = 3_009,
FileNotFound = 4_001,
PermissionDenied = 4_002,
ImportNotFound = 4_003,
CircularImport = 4_004,
ReentrancyRisk = 5_001,
UncheckedCall = 5_002,
TxOriginUsage = 5_003,
UnsafeDelegate = 5_004,
IntegerOverflowRisk = 5_005,
}Expand description
Error codes for programmatic error handling
Variants§
UnexpectedToken = 1_001
UnexpectedEof = 1_002
InvalidSyntax = 1_003
MissingSemicolon = 1_004
MissingBrace = 1_005
InvalidNumber = 1_006
InvalidString = 1_007
InvalidIdentifier = 1_008
UndefinedVariable = 2_001
TypeMismatch = 2_002
DuplicateDefinition = 2_003
UndefinedFunction = 2_004
UndefinedType = 2_005
InvalidAssignment = 2_006
ImmutableModification = 2_007
VisibilityError = 2_008
InvalidOverride = 2_009
MissingReturn = 2_010
UnreachableCode = 2_011
UnusedVariable = 2_012
UnusedFunction = 2_013
ShadowedVariable = 2_014
InvalidModifier = 2_015
IntegerOverflow = 2_501
IntegerUnderflow = 2_502
DivisionByZero = 2_503
ArrayOutOfBounds = 2_504
InvalidCast = 2_505
NullReference = 2_506
UnsupportedFeature = 3_001
InvalidBytecode = 3_002
StackOverflow = 3_003
GasLimitExceeded = 3_004
ContractTooLarge = 3_005
InvalidOpcode = 3_006
BreakOutsideLoop = 3_007
ContinueOutsideLoop = 3_008
InvalidJumpOffset = 3_009
FileNotFound = 4_001
PermissionDenied = 4_002
ImportNotFound = 4_003
CircularImport = 4_004
ReentrancyRisk = 5_001
UncheckedCall = 5_002
TxOriginUsage = 5_003
UnsafeDelegate = 5_004
IntegerOverflowRisk = 5_005
Implementations§
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more