sqlx_sqlite_conn_mgr/
error.rs1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum Error {
8 #[error("IO error: {0}")]
11 Io(#[from] std::io::Error),
12
13 #[error("Sqlx error: {0}")]
15 Sqlx(#[from] sqlx::Error),
16
17 #[error("Migration error: {0}")]
19 Migration(#[from] sqlx::migrate::MigrateError),
20
21 #[error("Database has been closed")]
23 DatabaseClosed,
24
25 #[error("Cannot attach database as read-write to a read-only connection")]
27 CannotAttachReadWriteToReader,
28
29 #[error(
31 "Invalid schema name '{0}': must contain only alphanumeric characters and underscores, and cannot start with a digit"
32 )]
33 InvalidSchemaName(String),
34
35 #[error(
37 "Database '{0}' appears multiple times in attached database list (would cause deadlock)"
38 )]
39 DuplicateAttachedDatabase(String),
40}