use core::fmt::{Display, Formatter, Result};
#[derive(Debug, PartialEq)]
pub enum Error {
InvalidMemoryAddress(u32),
InvalidMemoryAccessLength(usize),
InvalidProgramCounter(u32),
InvalidInstruction(u32),
InvalidCSRegister(u16),
InvalidCPURegister(u8),
IllegalInstruction(u32),
InterruptNotEnabled,
NoSyscallFunction,
}
impl core::error::Error for Error {}
impl Display for Error {
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
write!(f, "{self:?}")
}
}