Skip to main content

quill_sql/
error.rs

1use thiserror::Error;
2
3pub type QuillSQLResult<T, E = QuillSQLError> = Result<T, E>;
4
5#[derive(Debug, Error)]
6pub enum QuillSQLError {
7    #[error("Not support: {0}")]
8    NotSupport(String),
9
10    #[error("Internal error: {0}")]
11    Internal(String),
12
13    #[error("IO error: {0}")]
14    Io(#[from] std::io::Error),
15
16    #[error("Parser error: {0}")]
17    Parser(#[from] sqlparser::parser::ParserError),
18
19    #[error("Plan error: {0}")]
20    Plan(String),
21
22    #[error("Execution error: {0}")]
23    Execution(String),
24
25    #[error("Storage error: {0}")]
26    Storage(String),
27
28    #[error("Concurrent error: {0}")]
29    Concurrent(String),
30
31    #[error("Unwind")]
32    Unwind,
33}