pub enum NeoError {
InvalidOperation,
InvalidArgument,
InvalidType,
OutOfBounds,
DivisionByZero,
Overflow,
Underflow,
NullReference,
InvalidState,
Custom(String),
}Expand description
Neo N3 Error type
Represents all possible error conditions that can occur during Neo N3 smart contract execution.
Variants§
InvalidOperation
Operation is not valid in the current context
InvalidArgument
Argument has an invalid value or type
InvalidType
Type mismatch encountered during execution
OutOfBounds
Index or offset is out of valid bounds
DivisionByZero
Attempted division by zero
Overflow
Arithmetic overflow occurred
Underflow
Arithmetic underflow occurred
NullReference
Dereferenced a null or invalid reference
InvalidState
Internal state is invalid or corrupted
Custom(String)
Application-specific error with custom message
Implementations§
Source§impl NeoError
impl NeoError
Sourcepub fn new(message: &str) -> NeoError
pub fn new(message: &str) -> NeoError
Creates a new custom error with the given message.
§Examples
use neo_types::NeoError;
let err = NeoError::new("Custom error message");Trait Implementations§
impl Eq for NeoError
impl StructuralPartialEq for NeoError
Auto Trait Implementations§
impl Freeze for NeoError
impl RefUnwindSafe for NeoError
impl Send for NeoError
impl Sync for NeoError
impl Unpin for NeoError
impl UnwindSafe for NeoError
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