Enum rant::runtime::RuntimeErrorType
source · [−]pub enum RuntimeErrorType {
Show 19 variants
StackOverflow,
StackUnderflow,
InvalidAccess,
InvalidOperation,
InternalError,
ArgumentMismatch,
ArgumentError,
CannotInvokeValue,
AssertError,
TypeError,
ValueError(ValueError),
IndexError(IndexError),
KeyError(KeyError),
SliceError(SliceError),
SelectorError(SelectorError),
ModuleLoadError(ModuleLoadError),
UserError,
ControlFlowError,
DataSourceError(DataSourceError),
}
Expand description
Provides general categories of runtime errors encountered in Rant.
Variants
StackOverflow
Stack has overflowed.
Rant error ID: STACK_OVERFLOW_ERROR
StackUnderflow
Stack has underflowed.
Rant error ID: STACK_UNDERFLOW_ERROR
InvalidAccess
Variable access error, such as attempting to access a nonexistent variable or write to a constant
Rant error ID: INVALID_ACCESS_ERROR
InvalidOperation
Operation is not valid for the current program state
Rant error ID: INVALID_OP_ERROR
InternalError
Internal VM error, usually indicating a bug or corrupted data
Rant error ID: INTERNAL_ERROR
ArgumentMismatch
Too few/many arguments were passed to a function
Rant error ID: ARG_MISMATCH_ERROR
ArgumentError
Invalid argument passed to function
Rant error ID: ARG_ERROR
CannotInvokeValue
Tried to invoke a non-function
Rant error ID: INVOKE_ERROR
AssertError
Assertion failed
Rant error ID: ASSERT_ERROR
TypeError
Error occurred due to unexpected value type
Rant error ID: TYPE_ERROR
ValueError(ValueError)
Error occurred when creating value
Rant error ID: VALUE_ERROR
IndexError(IndexError)
Error occurred while indexing value
Rant error ID: INDEX_ERROR
KeyError(KeyError)
Error occurred while keying value
Rant error ID: KEY_ERROR
SliceError(SliceError)
Error occurred while slicing value
Rant error ID: SLICE_ERROR
SelectorError(SelectorError)
Error occurred while iterating selector
Rant error ID: SELECTOR_ERROR
ModuleLoadError(ModuleLoadError)
Error occurred while trying to load a module
Rant error ID: MODULE_ERROR
UserError
Error manually triggered by program
Rant error ID: USER_ERROR
ControlFlowError
Error during control flow operation (e.g. return or break)
Rant error ID: CONTROL_FLOW_ERROR
DataSourceError(DataSourceError)
Error occurred during data source operation.
Rant error ID: DATA_SOURCE_ERROR