1use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum RDBCError {
7 #[error("Native error: code({0}) {1}")]
8 NativeError(i32, String),
9
10 #[error("rdbc step return unexpect rows")]
11 UnexpectRows,
12
13 #[error("Call next first or no more rows")]
14 NextDataError,
15
16 #[error("Get column data out of range {0}")]
17 OutOfRange(u64),
18
19 #[error("stmt '{0}' bind named arg({1}) failed")]
20 BindArgError(String, String),
21
22 #[error("Get column by name {0}, not found")]
23 UnknownColumn(String),
24}