mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add a response code for dictionary not found
This commit is contained in:
parent
0bcc93c78e
commit
2bf0b685cd
1 changed files with 1 additions and 0 deletions
|
|
@ -444,6 +444,7 @@ impl Pddb {
|
||||||
let response = buf.to_original::<PddbDictRequest, _>().unwrap();
|
let response = buf.to_original::<PddbDictRequest, _>().unwrap();
|
||||||
let count = match response.code {
|
let count = match response.code {
|
||||||
PddbRequestCode::NoErr => response.index,
|
PddbRequestCode::NoErr => response.index,
|
||||||
|
PddbRequestCode::NotFound => return Err(Error::new(ErrorKind::NotFound, "dictionary not found")),
|
||||||
_ => return Err(Error::new(ErrorKind::Other, "Internal error")),
|
_ => return Err(Error::new(ErrorKind::Other, "Internal error")),
|
||||||
};
|
};
|
||||||
// very non-optimal, slow way of doing this, but let's just get it working first and optimize later.
|
// very non-optimal, slow way of doing this, but let's just get it working first and optimize later.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue