pub enum VmError {
Show 32 variants
GlobalStateError {
err: Box<dyn Send + Sync + Error>,
},
UnknownFunction {
func: FunctionId,
},
PcOutOfBounds {
func: FunctionId,
edges: usize,
got: usize,
},
EmptyStackError {
pc: ProgramCounter,
instr: Option<usize>,
expected: DataType,
},
StackTypeError {
pc: ProgramCounter,
instr: Option<usize>,
got: DataType,
expected: DataType,
},
StackLhsRhsTypeError {
pc: ProgramCounter,
instr: usize,
got: (DataType, DataType),
expected: DataType,
},
ArrayTypeError {
pc: ProgramCounter,
instr: usize,
got: DataType,
expected: DataType,
},
InstanceTypeError {
pc: ProgramCounter,
instr: usize,
class: String,
field: String,
got: DataType,
expected: DataType,
},
CastError {
pc: ProgramCounter,
instr: usize,
err: ValueError,
},
ArrIdxOutOfBoundsError {
pc: ProgramCounter,
instr: usize,
got: i64,
max: usize,
},
ProjUnknownFieldError {
pc: ProgramCounter,
instr: usize,
class: String,
field: String,
},
VarDecError {
pc: ProgramCounter,
instr: usize,
err: FrameStackError,
},
VarUndecError {
pc: ProgramCounter,
instr: usize,
err: FrameStackError,
},
VarGetError {
pc: ProgramCounter,
instr: usize,
err: FrameStackError,
},
VarSetError {
pc: ProgramCounter,
instr: usize,
err: FrameStackError,
},
SpawnError {
pc: ProgramCounter,
err: JoinError,
},
BranchTypeError {
pc: ProgramCounter,
branch: usize,
got: DataType,
expected: DataType,
},
IllegalBranchType {
pc: ProgramCounter,
branch: usize,
merge: MergeStrategy,
got: DataType,
expected: DataType,
},
FunctionTypeError {
pc: ProgramCounter,
name: String,
arg: usize,
got: DataType,
expected: DataType,
},
UnresolvedLocation {
pc: ProgramCounter,
name: String,
},
UnknownInput {
pc: ProgramCounter,
task: String,
name: DataName,
},
UnplannedInput {
pc: ProgramCounter,
task: String,
name: DataName,
},
FrameStackPushError {
pc: ProgramCounter,
err: FrameStackError,
},
FrameStackPopError {
pc: ProgramCounter,
err: FrameStackError,
},
ReturnTypeError {
pc: ProgramCounter,
got: DataType,
expected: DataType,
},
TaskTypeError {
pc: ProgramCounter,
name: String,
arg: usize,
got: DataType,
expected: DataType,
},
UnknownData {
pc: ProgramCounter,
name: String,
},
UnknownResult {
pc: ProgramCounter,
name: String,
},
UnknownPackage {
pc: ProgramCounter,
name: String,
version: Version,
},
ArgumentsSerializeError {
pc: ProgramCounter,
err: Error,
},
StackError {
pc: ProgramCounter,
instr: Option<usize>,
err: StackError,
},
Custom {
pc: ProgramCounter,
err: Box<dyn Send + Sync + Error>,
},
}
Expand description
Defines errors that relate to a VM’s execution.
Variants§
GlobalStateError
An error occurred while instantiating the custom state.
UnknownFunction
The given function pointer was out-of-bounds for the given workflow.
Fields
func: FunctionId
PcOutOfBounds
The given program counter was out-of-bounds for the given function.
EmptyStackError
We expected there to be a value on the stack but there wasn’t.
StackTypeError
The value on top of the stack was of unexpected data type.
StackLhsRhsTypeError
The two values on top of the stack (in a lefthand-side, righthand-side fashion) are of incorrect data types.
ArrayTypeError
A value in an Array was incorrectly typed.
InstanceTypeError
A value in an Instance was incorrectly typed.
CastError
Failed to perform a cast instruction.
ArrIdxOutOfBoundsError
The given integer was out-of-bounds for an array with given length.
ProjUnknownFieldError
The given field was not present in the given class
VarDecError
Could not declare the variable.
VarUndecError
Could not un-declare the variable.
VarGetError
Could not get the value of a variable.
VarSetError
Could not set the value of a variable.
SpawnError
Failed to spawn a new thread.
BranchTypeError
One of the branches of a parallel returned an invalid type.
IllegalBranchType
The branch’ type does not match that of the current merge strategy at all
FunctionTypeError
One of a function’s arguments was of an incorrect type.
UnresolvedLocation
We got told to run a function but do not know where.
UnknownInput
The given input (dataset, result) was not there as possible option for the given task.
UnplannedInput
The given input (dataset, result) was not yet planned at the time of execution.
FrameStackPushError
Attempted to call a function but the framestack thought otherwise.
FrameStackPopError
Attempted to call a function but the framestack was empty.
ReturnTypeError
The return type of a function was not correct
TaskTypeError
There was a type mismatch in a task call.
UnknownData
A given asset was not found at all.
UnknownResult
A given intermediate result was not found at all.
UnknownPackage
The given package was not known.
ArgumentsSerializeError
Failed to serialize the given argument list.
StackError
An error that relates to the stack.
Custom
A Vm-defined error.
Implementations§
source§impl VmError
impl VmError
sourcepub fn prettyprint(&self)
pub fn prettyprint(&self)
Prints the VM error neatly to stderr.
Trait Implementations§
source§impl Error for VmError
impl Error for VmError
1.30.0 · 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
Auto Trait Implementations§
impl Freeze for VmError
impl !RefUnwindSafe for VmError
impl Send for VmError
impl Sync for VmError
impl Unpin for VmError
impl !UnwindSafe for VmError
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request