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), ModuleError(ModuleResolveError), 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

ModuleError(ModuleResolveError)

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

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.