diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2017-11-21 13:15:00 +0100 |
---|---|---|
committer | Markus Unterwaditzer <markus@unterwaditzer.net> | 2017-11-21 13:15:00 +0100 |
commit | ad934d47c97c933eebb038816803af70a27bb536 (patch) | |
tree | 3fc5ca2bf55e191f1a2e7d5f090828f98b7545ba /src/error.rs | |
parent | a2f6ad5215e892d9243d75c8fdfaf61f8da99a05 (diff) |
Icalendar highlevel interface (#19)
* Add error kind for "not an icalendar"
* Move helper macros to utils
* Add optional date/datetime conversions
* Add optional dependency: chrono
* Add error types for converting from parser error from chrono
* Add AsDateTime for icalendar times
* Add travis build script with all features tested
* Add tests
* Add tests with simple test entry
* Add test for owncloud-generated cal entry
* Add conversions-testing for entries
* Use container type for returning either Date or DateTime
* fixup! Move helper macros to utils
* Fix to use list syntax
* Capitalize consistently
* Use ? instead of callback chaining
* Remove all unneeded imports
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index cf34910..22e64a8 100644 --- a/src/error.rs +++ b/src/error.rs @@ -5,6 +5,10 @@ error_chain! { VObjectError, VObjectErrorKind, ResultExt, Result; } + foreign_links { + ChronoParseError(::chrono::format::ParseError) #[cfg(feature = "timeconversions")]; + } + errors { ParserError(desc: String) { description("Parser error") @@ -16,6 +20,10 @@ error_chain! { display("Passed content string is not a VCard") } + NotAnICalendar(content: String) { + description("Input is not a valid ICalendar") + display("Not an ICalendar: '{}'", content) + } } |