From 90ee076ababfcb06eb277704b9118030d323ee1c Mon Sep 17 00:00:00 2001 From: Andrew Stoycos Date: Thu, 19 Jan 2023 12:47:50 -0500 Subject: [PATCH] Expose inner errors Currently aya will just report a standard outer level error on failure. Ensure that we also report the inner error condition back to the user Signed-off-by: Andrew Stoycos --- aya/src/bpf.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs index f5307f83..9fbd69ec 100644 --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -905,11 +905,11 @@ pub enum BpfError { }, /// Error parsing BPF object - #[error("error parsing BPF object")] + #[error("error parsing BPF object: {0}")] ParseError(#[from] ParseError), /// Error parsing BTF object - #[error("BTF error")] + #[error("BTF error: {0}")] BtfError(#[from] BtfError), /// Error performing relocations @@ -926,11 +926,11 @@ pub enum BpfError { #[error("no BTF parsed for object")] NoBTF, - #[error("map error")] + #[error("map error: {0}")] /// A map error MapError(#[from] MapError), - #[error("program error")] + #[error("program error: {0}")] /// A program error ProgramError(#[from] ProgramError), }