Enum whitespacers::WsErrorKind
source · pub enum WsErrorKind {
ParseError(usize, usize, usize),
StackError,
KeyError,
InvalidIndex,
CallStackError,
DivisionError,
IOError,
RuntimeParseError,
Overflow,
InumOverflow(isize, BigInt),
}
Expand description
Simple information on what kind of error occurred.
Variants§
ParseError(usize, usize, usize)
Compile-time parse error
StackError
The stack was not of the correct size to execute an instruction.
KeyError
A missing key was requested from the heap.
InvalidIndex
The program tried to execute an instruction that doesn’t exist (generally caused by control flow hitting the end of the program).
CallStackError
The program tried to return but there was no location to return to on the callstack.
DivisionError
Division or Modulo by zero.
IOError
Something went wrong while trying to read from input or write to output.
RuntimeParseError
The program tried to read a number but no number was given.
Overflow
An overflow occurred during an arithmetric operation. This will normally not be returned unless fallback is disabled.
InumOverflow(isize, BigInt)
An overflow occurred when a number input was requested. This is a bit of a special case, as the state cannot be rewound to before the number was parsed. Therefore, the key where the number will be read to, and the oversized integer that was parsed are returned in the error, and the location at which the error occurred is set to be the operation after the failed inum operation. Again, this will not be returned unless fallback is disabled.
Trait Implementations§
source§impl Clone for WsErrorKind
impl Clone for WsErrorKind
source§fn clone(&self) -> WsErrorKind
fn clone(&self) -> WsErrorKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for WsErrorKind
impl Send for WsErrorKind
impl Sync for WsErrorKind
impl Unpin for WsErrorKind
impl UnwindSafe for WsErrorKind
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
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>
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>
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