diff options
author | Alex Crichton <alex@alexcrichton.com> | 2016-03-07 23:48:01 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2016-03-07 23:48:01 -0800 |
commit | d02e62233088df15fd43b86aa97e0695b375a46b (patch) | |
tree | 2916720381cd7f8448031fe4ffd83d3452dfc8bb /src/encoder/mod.rs | |
parent | 77be56048c57614fd0f0a2e80c089861d68aadc3 (diff) | |
download | milf-rs-d02e62233088df15fd43b86aa97e0695b375a46b.tar.gz milf-rs-d02e62233088df15fd43b86aa97e0695b375a46b.zip |
WIP
Diffstat (limited to 'src/encoder/mod.rs')
-rw-r--r-- | src/encoder/mod.rs | 3 |
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), } } } |