MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / fmt

Method fmt

crates/virtual-machine/src/error.rs:23–40  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

21 Other(String),
22}
23
24impl 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)"),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected