From d02e62233088df15fd43b86aa97e0695b375a46b Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 7 Mar 2016 23:48:01 -0800 Subject: WIP --- src/encoder/mod.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/encoder/mod.rs') 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), } } } -- cgit v1.2.3