#[non_exhaustive]pub enum Error {
Show 26 variants
ExpectedToken(ConstString, ConstString, usize),
ExpressionExpected(usize),
NoChunk,
ParseHex(ConstString, usize),
ParseInt(ConstString, usize),
ParseNumber(ConstString, usize),
ToManyValues,
UnexpectedChar(ConstString, usize),
UnexpectedToken(usize),
UnterminatedString(ConstString, usize),
BoolNoArithmetic,
DuplicateEnumVariant(ConstString, i8, i8),
EnumValNotFound(ConstString, usize),
NilValue,
NoBoolean,
NoComparison,
NoDouble,
NoInteger,
NoString,
NoNumber,
OnlyAdd,
StackOverflow,
UnknownOpCode,
Env(Error),
Unexpected(ConstString, ConstString, u32),
Unreachable(ConstString, u32),
}Expand description
tinyscript error type
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ExpectedToken(ConstString, ConstString, usize)
Did not get the expected Token.
ExpressionExpected(usize)
Whatever it is: It is not an expression.
NoChunk
Compile failed to create a Chunk.
ParseHex(ConstString, usize)
Not a hex number.
ParseInt(ConstString, usize)
Not an int number.
ParseNumber(ConstString, usize)
Not a float number.
ToManyValues
Exceeded the size of storage for values.
UnexpectedChar(ConstString, usize)
This Char should not be here.
UnexpectedToken(usize)
Got an unexpected Token.
UnterminatedString(ConstString, usize)
Missing string termination.
BoolNoArithmetic
No arithemetic with boolean for now.
DuplicateEnumVariant(ConstString, i8, i8)
Tried to redefine an enum value.
EnumValNotFound(ConstString, usize)
Enum value is not defined.
NilValue
Nil does not allow anything.
NoBoolean
Expected Boolean, got something else.
NoComparison
Comparisons (greater, less) only with numbers
NoDouble
Expected Double, got something else.
NoInteger
Expected Integer, got something else.
NoString
Expected String, got something else.
NoNumber
Expected Number, got something else.
OnlyAdd
Strings only allow additions.
StackOverflow
Stack of values exceeded.
UnknownOpCode
An unknown OpCode.
Env(Error)
Pass through from crate::environment::Error
Unexpected(ConstString, ConstString, u32)
A really unexpected error happened.
Unreachable(ConstString, u32)
This code line never should have been reached.