1"""Errors thrown by icalendar."""
2
3
4class InvalidCalendar(ValueError):
5 """The calendar given is not valid.
6
7 This calendar does not conform with RFC 5545 or breaks other RFCs.
8 """
9
10
11class IncompleteComponent(ValueError):
12 """The component is missing attributes.
13
14 The attributes are not required, otherwise this would be
15 an InvalidCalendar. But in order to perform calculations,
16 this attribute is required.
17
18 This error is not raised in the UPPERCASE properties like .DTSTART,
19 only in the lowercase computations like .start.
20 """
21
22
23class IncompleteAlarmInformation(ValueError):
24 """The alarms cannot be calculated yet because information is missing."""
25
26
27class LocalTimezoneMissing(IncompleteAlarmInformation):
28 """We are missing the local timezone to compute the value.
29
30 Use Alarms.set_local_timezone().
31 """
32
33
34class ComponentEndMissing(IncompleteAlarmInformation):
35 """We are missing the end of a component that the alarm is for.
36
37 Use Alarms.set_end().
38 """
39
40
41class ComponentStartMissing(IncompleteAlarmInformation):
42 """We are missing the start of a component that the alarm is for.
43
44 Use Alarms.set_start().
45 """
46
47
48class FeatureWillBeRemovedInFutureVersion(DeprecationWarning):
49 """This feature will be removed in a future version."""
50
51
52__all__ = [
53 "ComponentEndMissing",
54 "ComponentStartMissing",
55 "FeatureWillBeRemovedInFutureVersion",
56 "IncompleteAlarmInformation",
57 "IncompleteComponent",
58 "InvalidCalendar",
59 "LocalTimezoneMissing",
60]