mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
delegate memory error details
This commit is contained in:
parent
d866f0f3f5
commit
a48f62eb13
@ -96,8 +96,8 @@ impl Gemini {
|
|||||||
match self.database.records() {
|
match self.database.records() {
|
||||||
Ok(records) => {
|
Ok(records) => {
|
||||||
for record in records {
|
for record in records {
|
||||||
if self.memory.add(record.id, record.pem).is_err() {
|
if let Err(reason) = self.memory.add(record.id, record.pem) {
|
||||||
return Err(Error::MemoryIndex(record.id));
|
return Err(Error::MemoryIndex(reason));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,6 @@ pub enum Error {
|
|||||||
DatabaseIndex(sqlite::Error),
|
DatabaseIndex(sqlite::Error),
|
||||||
DatabaseRecordCreate(sqlite::Error),
|
DatabaseRecordCreate(sqlite::Error),
|
||||||
MemoryClear(super::memory::Error),
|
MemoryClear(super::memory::Error),
|
||||||
MemoryIndex(i64),
|
MemoryIndex(super::memory::Error),
|
||||||
Certificate(Box<dyn std::error::Error>),
|
Certificate(Box<dyn std::error::Error>),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user