expand on "internal error" for .get() results from PDDB

This commit is contained in:
bunnie 2022-10-20 17:40:11 +08:00
parent fea53fad34
commit fc8f2a25e8
2 changed files with 2 additions and 2 deletions

View file

@ -252,7 +252,7 @@ pub struct PddbBasisList {
pub num: u32,
}
#[derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)]
#[derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize, Debug)]
pub enum PddbRequestCode {
Create = 0,
Open = 1,

View file

@ -428,7 +428,7 @@ impl Pddb {
PddbRequestCode::NoFreeSpace => Err(Error::new(ErrorKind::OutOfMemory, "No more space on disk")),
PddbRequestCode::NotMounted => Err(Error::new(ErrorKind::ConnectionReset, "PDDB was unmounted")),
PddbRequestCode::NotFound => Err(Error::new(ErrorKind::NotFound, "Dictionary or key was not found")),
_ => Err(Error::new(ErrorKind::Other, "Internal error"))
_ => Err(Error::new(ErrorKind::Other, format!("Unhandled return code: {:?}", response.result))),
}
}