mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
expand on errors reported
This commit is contained in:
parent
e7e110ce76
commit
c3ba30d55d
1 changed files with 5 additions and 2 deletions
|
|
@ -603,7 +603,9 @@ impl Pddb {
|
|||
match response.code {
|
||||
PddbRequestCode::NoErr => (),
|
||||
PddbRequestCode::NotFound => return Err(Error::new(ErrorKind::NotFound, "dictionary not found")),
|
||||
_ => return Err(Error::new(ErrorKind::Other, "Internal error")),
|
||||
PddbRequestCode::AccessDenied => return Err(Error::new(ErrorKind::PermissionDenied, "concurrent operation in progress")),
|
||||
PddbRequestCode::Uninit => return Err(Error::new(ErrorKind::ConnectionAborted, "Return code not set getting key count, server aborted?")),
|
||||
_ => return Err(Error::new(ErrorKind::Other, "Internal error generating key count")),
|
||||
};
|
||||
// v2 key listing packs the key list into a larger [u8] field that should cut down on the number of messages
|
||||
// required to list a large dictionary by about a factor of 50.
|
||||
|
|
@ -625,7 +627,8 @@ impl Pddb {
|
|||
match response.retcode {
|
||||
ArchivedPddbRetcode::Ok => (),
|
||||
ArchivedPddbRetcode::AccessDenied => return Err(Error::new(ErrorKind::PermissionDenied, "KeyList facility locked by another process, try again later")),
|
||||
_ => return Err(Error::new(ErrorKind::Other, "Internal Error")),
|
||||
ArchivedPddbRetcode::Uninit => return Err(Error::new(ErrorKind::ConnectionAborted, "Return code not set fetching list, server aborted?")),
|
||||
_ => return Err(Error::new(ErrorKind::Other, "Internal Error fetching list")),
|
||||
}
|
||||
// the [u8] data is structured as a packed list of u8-len + u8 data slice. The max length of
|
||||
// a PDDB key name is guaranteed to be shorter than a u8. If the length field is 0, then this
|
||||
|
|
|
|||
Loading…
Reference in a new issue