Skip to content

Commit

Permalink
Merge pull request openwsn-berkeley#309 from geonnave/improve-error-r…
Browse files Browse the repository at this point in the history
…eporting

Errors: small improvement on c and python wrappers
  • Loading branch information
geonnave authored Oct 2, 2024
2 parents 6a1c520 + eaff3aa commit 840b7c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lakers-c/src/ead_authz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ pub unsafe extern "C" fn authz_device_process_ead_2(
(*device_c).done = device;
0
}
Err(_) => -1,
Err(err) => err as i8,
}
}
5 changes: 4 additions & 1 deletion lakers-python/src/responder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ impl PyEdhocResponder {
) -> PyResult<Bound<'a, PyBytes>> {
let c_r = match c_r {
Some(c_r) => ConnId::from_slice(c_r.as_slice()).ok_or(
pyo3::exceptions::PyValueError::new_err("Connection identifier out of range"),
pyo3::exceptions::PyValueError::new_err(format!(
"Connection identifier out of range: {:?}",
c_r
)),
)?,
None => generate_connection_identifier_cbor(&mut default_crypto()),
};
Expand Down

0 comments on commit 840b7c2

Please sign in to comment.