mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-03-02 23:23:49 +00:00
hypervisor: emulator: Print out all exception details
Print out all the details from an emulator exception. As identified by the new beta clippy. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
84f0f332b3
commit
7d7577007a
@ -18,7 +18,18 @@ pub struct Exception<T: Debug> {
|
||||
|
||||
impl<T: Debug> Display for Exception<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "Exception {:?} at IP {:#x}", self.vector, self.ip)
|
||||
write!(
|
||||
f,
|
||||
"Exception {:?} at IP {:#x}{}{}",
|
||||
self.vector,
|
||||
self.ip,
|
||||
self.error
|
||||
.map(|e| format!(": error {:x}", e))
|
||||
.unwrap_or_else(|| "".to_owned()),
|
||||
self.payload
|
||||
.map(|payload| format!(": payload {:x}", payload))
|
||||
.unwrap_or_else(|| "".to_owned())
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user