reintroduce the unrecoverable error and use it where its supposed to be used

This commit is contained in:
Tamo
2025-01-23 00:53:12 +01:00
committed by Louis Dureuil
parent 7eb23f73ba
commit 7740997ea8
3 changed files with 14 additions and 12 deletions

View File

@@ -319,11 +319,9 @@ impl IndexScheduler {
let ret = catch_unwind(AssertUnwindSafe(|| self.process_upgrade(progress)));
match ret {
Ok(Ok(())) => (),
Ok(Err(e)) => return Err(Error::TaskDatabaseUpgrade(Box::new(e))),
Ok(Err(e)) => return Err(Error::DatabaseUpgrade(Box::new(e))),
Err(_e) => {
return Err(Error::TaskDatabaseUpgrade(Box::new(
Error::ProcessBatchPanicked,
)));
return Err(Error::DatabaseUpgrade(Box::new(Error::ProcessBatchPanicked)));
}
}