diff options
Diffstat (limited to 'src/errors.rs')
-rw-r--r-- | src/errors.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/errors.rs b/src/errors.rs index da1aea9..d90b3c6 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -80,3 +80,10 @@ impl From<::std::io::Error> for KhError { KhError::new(&description, Some(Box::new(e))) } } + +impl From<chrono::ParseError> for KhError { + fn from(e: chrono::ParseError) -> KhError { + let description = e.to_string(); + KhError::new(&description, Some(Box::new(e))) + } +} |