aboutsummaryrefslogtreecommitdiff
path: root/src/encoder/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoder/mod.rs')
-rw-r--r--src/encoder/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/encoder/mod.rs b/src/encoder/mod.rs
index cdfe8e2..fb628fa 100644
--- a/src/encoder/mod.rs
+++ b/src/encoder/mod.rs
@@ -61,6 +61,8 @@ pub enum Error {
/// Indicates that a type other than a string was attempted to be used as a
/// map key type.
InvalidMapKeyType,
+ /// A custom error type was generated
+ Custom(String),
}
#[derive(PartialEq)]
@@ -202,6 +204,7 @@ impl fmt::Display for Error {
at this location"),
Error::InvalidMapKeyType => write!(f, "only strings can be used as \
key types"),
+ Error::Custom(ref s) => write!(f, "custom error: {}", s),
}
}
}