pub enum Error {
InvalidMemoryAddress(u32),
InvalidProgramCounter(u32),
InvalidInstruction(u32),
InvalidCSRegister(u16),
InvalidCPURegister(u8),
IllegalInstruction(u32),
InterruptNotEnabled,
NoSyscallFunction,
Custom(&'static str),
}Available on crate feature
interpreter only.Expand description
Embive Interpreter Error
Variants§
InvalidMemoryAddress(u32)
Memory address is out of bounds. The memory address is provided.
InvalidProgramCounter(u32)
Program counter is out of bounds. The program counter is provided.
InvalidInstruction(u32)
Instruction is invalid. The program counter is provided.
InvalidCSRegister(u16)
Control and Status Register is invalid or not supported. The CSR address is provided.
InvalidCPURegister(u8)
CPU Register is out of bounds. The register index is provided.
IllegalInstruction(u32)
Instruction is illegal. The program counter is provided.
InterruptNotEnabled
Interrupt not enabled by interpreted code (CSR mie bit crate::interpreter::EMBIVE_INTERRUPT_CODE).
NoSyscallFunction
No syscall function is set.
Custom(&'static str)
Custom error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
Mutably borrows from an owned value. Read more