(&self, f: &mut fmt::Formatter<'_>)
| 21 | Other(String), |
| 22 | } |
| 23 | |
| 24 | impl fmt::Display for VmError { |
| 25 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 26 | match self { |
| 27 | Self::BusError(addr) => write!(f, "bus error at address {addr:#010x}"), |
| 28 | Self::WriteToRom => write!(f, "write to read-only memory"), |
| 29 | Self::InstructionAccessFault(addr) => { |
| 30 | write!(f, "instruction access fault at {addr:#010x}") |
| 31 | } |
| 32 | Self::LoadAccessFault(addr) => write!(f, "load access fault at {addr:#010x}"), |
| 33 | Self::StoreAccessFault(addr) => write!(f, "store access fault at {addr:#010x}"), |
| 34 | Self::IllegalInstruction(word) => write!(f, "illegal instruction {word:#010x}"), |
| 35 | Self::Ecall => write!(f, "environment call"), |
| 36 | Self::Ebreak => write!(f, "breakpoint"), |
| 37 | Self::InstructionPageFault(addr) => { |
| 38 | write!(f, "instruction page fault at {addr:#010x}") |
| 39 | } |
| 40 | Self::LoadPageFault(addr) => write!(f, "load page fault at {addr:#010x}"), |
| 41 | Self::StorePageFault(addr) => write!(f, "store page fault at {addr:#010x}"), |
| 42 | Self::Mret => write!(f, "return from machine-mode trap (MRET)"), |
| 43 | Self::Sret => write!(f, "return from supervisor-mode trap (SRET)"), |
nothing calls this directly
no outgoing calls
no test coverage detected