From 2d1e01588ceaf07ff6962d6e5c91deb376393eee Mon Sep 17 00:00:00 2001 From: Christopher Berner Date: Tue, 30 May 2023 12:07:03 -0700 Subject: [PATCH] Implement std::Error for all error enums --- src/error.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/error.rs b/src/error.rs index 0a69da4a..b3f88c96 100644 --- a/src/error.rs +++ b/src/error.rs @@ -71,6 +71,8 @@ impl Display for StorageError { } } +impl std::error::Error for StorageError {} + /// Errors related to opening tables #[derive(Debug)] #[non_exhaustive] @@ -186,6 +188,8 @@ impl Display for TableError { } } +impl std::error::Error for TableError {} + /// Errors related to opening a database #[derive(Debug)] #[non_exhaustive] @@ -234,6 +238,8 @@ impl Display for DatabaseError { } } +impl std::error::Error for DatabaseError {} + /// Errors related to savepoints #[derive(Debug)] #[non_exhaustive] @@ -273,6 +279,8 @@ impl Display for SavepointError { } } +impl std::error::Error for SavepointError {} + /// Errors related to compaction #[derive(Debug)] #[non_exhaustive] @@ -312,6 +320,8 @@ impl Display for CompactionError { } } +impl std::error::Error for CompactionError {} + /// Errors related to transactions #[derive(Debug)] #[non_exhaustive] @@ -350,6 +360,8 @@ impl Display for TransactionError { } } +impl std::error::Error for TransactionError {} + /// Errors related to committing transactions #[derive(Debug)] #[non_exhaustive] @@ -388,6 +400,8 @@ impl Display for CommitError { } } +impl std::error::Error for CommitError {} + /// Superset of all other errors that can occur. Convenience enum so that users can convert all errors into a single type #[derive(Debug)] #[non_exhaustive]