2022-09-06 23:49:19 +02:00
|
|
|
use milli::heed;
|
2022-09-06 16:43:59 +02:00
|
|
|
use thiserror::Error;
|
|
|
|
|
|
|
|
#[derive(Error, Debug)]
|
|
|
|
pub enum Error {
|
2022-09-07 21:27:06 +02:00
|
|
|
#[error("Index `{0}` not found")]
|
2022-09-07 20:08:07 +02:00
|
|
|
IndexNotFound(String),
|
2022-09-07 21:27:06 +02:00
|
|
|
#[error("Index `{0}` already exists")]
|
2022-09-07 20:08:07 +02:00
|
|
|
IndexAlreadyExists(String),
|
2022-09-06 23:49:19 +02:00
|
|
|
#[error("Corrupted task queue.")]
|
|
|
|
CorruptedTaskQueue,
|
|
|
|
#[error(transparent)]
|
|
|
|
Heed(#[from] heed::Error),
|
|
|
|
#[error(transparent)]
|
|
|
|
Milli(#[from] milli::Error),
|
2022-09-14 16:16:53 +02:00
|
|
|
#[error(transparent)]
|
2022-09-07 20:30:33 +02:00
|
|
|
IndexError(#[from] index::error::IndexError),
|
2022-09-07 21:27:06 +02:00
|
|
|
#[error(transparent)]
|
2022-09-14 16:16:53 +02:00
|
|
|
FileStore(#[from] file_store::Error),
|
|
|
|
#[error(transparent)]
|
2022-09-07 21:27:06 +02:00
|
|
|
IoError(#[from] std::io::Error),
|
2022-09-06 23:49:19 +02:00
|
|
|
|
|
|
|
#[error(transparent)]
|
|
|
|
Anyhow(#[from] anyhow::Error),
|
2022-09-06 16:43:59 +02:00
|
|
|
}
|