summaryrefslogtreecommitdiffstats
path: root/src/error.rs
blob: 22e64a8d3fd3f10005816dc5450e47a0cdb7917b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
error_chain! {

    types {
        VObjectError, VObjectErrorKind, ResultExt, Result;
    }

    foreign_links {
        ChronoParseError(::chrono::format::ParseError) #[cfg(feature = "timeconversions")];
    }

    errors {
        ParserError(desc: String) {
            description("Parser error")
            display("{}", desc)
        }

        NotAVCard {
            description("Input is not a valid VCard")
            display("Passed content string is not a VCard")
        }

        NotAnICalendar(content: String) {
            description("Input is not a valid ICalendar")
            display("Not an ICalendar: '{}'", content)
        }
    }


}