summaryrefslogtreecommitdiffstats
path: root/vendor/gix/src/object/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix/src/object/errors.rs')
-rw-r--r--vendor/gix/src/object/errors.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/vendor/gix/src/object/errors.rs b/vendor/gix/src/object/errors.rs
new file mode 100644
index 000000000..eb7733473
--- /dev/null
+++ b/vendor/gix/src/object/errors.rs
@@ -0,0 +1,34 @@
+///
+pub mod conversion {
+
+ /// The error returned by [`crate::object::try_to_()`][crate::Object::try_to_commit_ref()].
+ #[derive(Debug, thiserror::Error)]
+ #[allow(missing_docs)]
+ pub enum Error {
+ #[error(transparent)]
+ Decode(#[from] gix_object::decode::Error),
+ #[error("Expected object type {}, but got {}", .expected, .actual)]
+ UnexpectedType {
+ expected: gix_object::Kind,
+ actual: gix_object::Kind,
+ },
+ }
+}
+
+///
+pub mod find {
+ /// Indicate that an error occurred when trying to find an object.
+ pub type Error = gix_odb::store::find::Error;
+
+ ///
+ pub mod existing {
+ /// An object could not be found in the database, or an error occurred when trying to obtain it.
+ pub type Error = gix_odb::find::existing::Error<gix_odb::store::find::Error>;
+ }
+}
+
+///
+pub mod write {
+ /// An error to indicate writing to the loose object store failed.
+ pub type Error = gix_odb::store::write::Error;
+}