aboutsummaryrefslogtreecommitdiff
path: root/src/errors/ptr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors/ptr.rs')
-rw-r--r--src/errors/ptr.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/errors/ptr.rs b/src/errors/ptr.rs
new file mode 100644
index 0000000..e0c3d05
--- /dev/null
+++ b/src/errors/ptr.rs
@@ -0,0 +1,19 @@
+//! Smart pointer alias errors.
+
+/// Error type for [`SomePtr`].
+///
+/// [`SomePtr`]: crate::ptr::SomePtr
+#[derive(thiserror::Error, Debug)]
+pub enum SomePtrError
+{
+ /// Tried to get as a wrong smart pointer type.
+ #[error("Wrong smart pointer type. Expected {expected}, found {found}")]
+ WrongPtrType
+ {
+ /// The expected smart pointer type.
+ expected: &'static str,
+
+ /// The found smart pointer type.
+ found: &'static str,
+ },
+}