#[non_exhaustive]pub enum RuntimeErrorKind {
Show 31 variants
UninitializedValue,
ExpectedNonNil,
UndefinedGlobal {
name: String,
},
MissingArgument {
name: &'static str,
},
TypeMismatch {
expected: &'static str,
actual: MiraType,
},
NotCallable {
actual: MiraType,
},
MissingIndexOrField,
ArrayLimit {
requested: usize,
max: usize,
},
ForeignHandle,
InvalidHandle {
category: &'static str,
},
HandleTypeMismatch {
category: &'static str,
},
ArenaExhausted {
category: &'static str,
},
ReentrantRun,
InvalidControlFlow {
context: &'static str,
},
InvalidUpvalueLevel {
level: usize,
},
Timeout,
MaxCallDepth {
max: u32,
},
EscapingClosure,
ExecutionEnded,
InvalidConstantKind {
index: usize,
expected: &'static str,
},
InvalidMatrixSize,
MatrixMustBeSquare,
IncompatibleMatrixDimensions,
InvalidIntegerArgument {
name: &'static str,
constraint: &'static str,
},
InvalidUpdateEntryCount {
actual: usize,
},
InvalidDateTime,
InvalidTimestamp {
actual: MiraType,
},
TimeOffsetOutOfRange,
JsonSerialization {
source: Error,
},
InvalidJson {
source: Error,
},
UserMessage {
message: String,
},
}Expand description
A VM or standard-library execution failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UninitializedValue
A register was read before initialization.
ExpectedNonNil
A non-nil value was required.
UndefinedGlobal
A global variable is not defined.
MissingArgument
An argument is required.
TypeMismatch
A value has the wrong type for an operation.
Fields
NotCallable
A value is not callable.
MissingIndexOrField
An index or field does not exist.
ArrayLimit
An array allocation would exceed the configured limit.
ForeignHandle
An arena handle belongs to another runtime.
InvalidHandle
An arena handle is invalid for its value category.
HandleTypeMismatch
The value behind a typed handle has a different concrete Rust type.
ArenaExhausted
One arena category exhausted its 32-bit slot space.
ReentrantRun
Runtime execution was entered recursively.
InvalidControlFlow
Internal bytecode control flow reached an invalid boundary.
InvalidUpvalueLevel
An upvalue level is invalid for the current frame.
Timeout
Execution exceeded its time limit.
MaxCallDepth
Execution exceeded its call-depth limit.
EscapingClosure
A script closure or script module attempted to escape a run.
ExecutionEnded
A script-scoped callable was used after its run ended.
InvalidConstantKind
Bytecode referenced a constant with an incompatible kind.
InvalidMatrixSize
Matrix dimensions are invalid or exceed the configured limit.
MatrixMustBeSquare
A matrix operation requires a square matrix.
IncompatibleMatrixDimensions
Matrix operands have incompatible dimensions.
InvalidIntegerArgument
An integer-valued argument failed its domain constraint.
InvalidUpdateEntryCount
The number of update entries is not valid.
InvalidDateTime
A datetime string could not be parsed.
InvalidTimestamp
A value cannot be interpreted as a timestamp.
TimeOffsetOutOfRange
A timezone offset is outside the supported range.
JsonSerialization
JSON serialization failed.
InvalidJson
JSON input is invalid.
UserMessage
A script assertion or panic supplied a message.
Trait Implementations§
Source§impl Debug for RuntimeErrorKind
impl Debug for RuntimeErrorKind
Source§impl Display for RuntimeErrorKind
impl Display for RuntimeErrorKind
Source§impl Error for RuntimeErrorKind
impl Error for RuntimeErrorKind
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()