diff --git a/libbpf-cargo/src/lib.rs b/libbpf-cargo/src/lib.rs index fba10ab3..56aa8c5e 100644 --- a/libbpf-cargo/src/lib.rs +++ b/libbpf-cargo/src/lib.rs @@ -88,10 +88,10 @@ mod test; /// Canonical error type for this crate. #[derive(Error, Debug)] pub enum Error { - #[error(transparent)] - Build(anyhow::Error), - #[error(transparent)] - Generate(anyhow::Error), + #[error("Error building BPF object file {0}")] + Build(#[source]anyhow::Error), + #[error("Error generating skeleton {0}")] + Generate(#[source]anyhow::Error), } pub type Result = result::Result;