pub struct VmError { /* private fields */ }Expand description
Errors raised by the execution of the virtual machine.
Implementations§
source§impl VmError
impl VmError
sourcepub fn bad_argument<T>(arg: usize, value: &Value) -> Result<Self, VmError>where
T: TypeOf,
pub fn bad_argument<T>(arg: usize, value: &Value) -> Result<Self, VmError>where T: TypeOf,
Bad argument.
sourcepub fn expected_any(actual: TypeInfo) -> Self
pub fn expected_any(actual: TypeInfo) -> Self
Construct an expected any error.
sourcepub fn kind(&self) -> &VmErrorKind
pub fn kind(&self) -> &VmErrorKind
Access the underlying error kind.
sourcepub fn into_kind(self) -> VmErrorKind
pub fn into_kind(self) -> VmErrorKind
Access the underlying error kind while consuming the error.
sourcepub fn as_unwound(
&self
) -> (&VmErrorKind, Option<(&Arc<Unit>, usize, &[CallFrame])>)
pub fn as_unwound( &self ) -> (&VmErrorKind, Option<(&Arc<Unit>, usize, &[CallFrame])>)
Unpack an unwinded error, if it is present.
Trait Implementations§
source§impl Error for VmError
impl Error for VmError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()