Merge pull request #89 from willfindlay/errors

aya/maps: improve map errors to be more descriptive
pull/91/head
Alessandro Decina 3 years ago committed by GitHub
commit 3a8e4fe9b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -88,17 +88,19 @@ pub enum MapError {
#[error("the map `{name}` has already been pinned")]
AlreadyPinned { name: String },
#[error("failed to create map `{name}`: {code}")]
#[error("failed to create map `{name}` with code {code}")]
CreateError {
name: String,
code: libc::c_long,
#[source]
io_error: io::Error,
},
#[error("failed to pin map `{name}`: {code}")]
#[error("failed to pin map `{name}` with code {code}")]
PinError {
name: String,
code: libc::c_long,
#[source]
io_error: io::Error,
},
@ -120,10 +122,11 @@ pub enum MapError {
#[error("the program is not loaded")]
ProgramNotLoaded,
#[error("the `{call}` syscall failed with code {code} io_error {io_error}")]
#[error("the `{call}` syscall failed with code {code}")]
SyscallError {
call: String,
code: libc::c_long,
#[source]
io_error: io::Error,
},

Loading…
Cancel
Save