diff --git a/src/main.rs b/src/main.rs index 3c21969..b3a3f41 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,7 +58,17 @@ impl fmt::Display for Error { } } -impl error::Error for Error {} +impl error::Error for Error { + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + match self { + Error::Bootconfig(e) => Some(e), + Error::DiskImage(e) => Some(e), + Error::Partitions(e) => Some(e), + Error::TransformSparse(e) => Some(e), + Error::Uboot(e) => Some(e), + Error::Vbmeta(e) => Some(e), } + } +} #[derive(Parser)] #[command(author, version, about, long_about = None)]