From 1899d5f4fd3ec5d91e40a94d671a7756125a4487 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 3f765b9a..6ad6b084 100644 --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -857,11 +857,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 @@ -876,11 +876,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), }