diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-02-25 11:24:18 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-03-06 09:24:19 +0200 |
commit | 4a98c9690801bac2821fe71aaefe63c1376f6256 (patch) | |
tree | cff207fd1a4c680d2a0c467dc371f53b885557cd /src/error.rs | |
parent | 83b83530c05e23945cfe5a11a2125c4d93d40a93 (diff) | |
download | obnam2-4a98c9690801bac2821fe71aaefe63c1376f6256.tar.gz |
refactor: add a low level SQLite wrapper
This makes the code clearer and allows for catching more errors,
albeit at runtime, such as using the wrong column name.
Sponsored-by: author
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index e8f5ee8..cf18c83 100644 --- a/src/error.rs +++ b/src/error.rs @@ -5,6 +5,7 @@ use crate::cipher::CipherError; use crate::client::ClientError; use crate::cmd::restore::RestoreError; use crate::config::ClientConfigError; +use crate::db::DatabaseError; use crate::generation::{LocalGenerationError, NascentError}; use crate::genlist::GenerationListError; use crate::passwords::PasswordError; @@ -51,6 +52,10 @@ pub enum ObnamError { #[error(transparent)] LocalGenerationError(#[from] LocalGenerationError), + /// Error using a Database. + #[error(transparent)] + Database(#[from] DatabaseError), + /// Error restoring a backup. #[error(transparent)] RestoreError(#[from] RestoreError), |