Source code for icalendar.error
"""Errors thrown by icalendar."""
[docs]
class InvalidCalendar(ValueError):
"""The calendar given is not valid.
This calendar does not conform with RFC 5545 or breaks other RFCs.
"""
[docs]
class IncompleteComponent(ValueError):
"""The component is missing attributes.
The attributes are not required, otherwise this would be
an InvalidCalendar. But in order to perform calculations,
this attribute is required.
This error is not raised in the UPPERCASE properties like .DTSTART,
only in the lowercase computations like .start.
"""
[docs]
class LocalTimezoneMissing(IncompleteAlarmInformation):
"""We are missing the local timezone to compute the value.
Use Alarms.set_local_timezone().
"""
[docs]
class ComponentEndMissing(IncompleteAlarmInformation):
"""We are missing the end of a component that the alarm is for.
Use Alarms.set_end().
"""
[docs]
class ComponentStartMissing(IncompleteAlarmInformation):
"""We are missing the start of a component that the alarm is for.
Use Alarms.set_start().
"""
[docs]
class FeatureWillBeRemovedInFutureVersion(DeprecationWarning):
"""This feature will be removed in a future version."""
__all__ = [
"ComponentEndMissing",
"ComponentStartMissing",
"FeatureWillBeRemovedInFutureVersion",
"IncompleteAlarmInformation",
"IncompleteComponent",
"InvalidCalendar",
"LocalTimezoneMissing",
]