Skip to main content

mq_db/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum MqdbError {
5    #[error("I/O error: {0}")]
6    Io(#[from] std::io::Error),
7
8    #[error("Parse error: {0}")]
9    Parse(String),
10
11    #[error("Storage error: {0}")]
12    Storage(String),
13
14    #[error("Document not found: id={0}")]
15    DocumentNotFound(u32),
16
17    #[error("SQL parse error: {0}")]
18    SqlParse(String),
19
20    #[error("SQL execution error: {0}")]
21    SqlExec(String),
22
23    #[error("mq error: {0}")]
24    Mq(String),
25}