-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remap pydantic exceptions to new ical specific exceptions (#242)
* Remap pydantic exceptions to new ical specific exceptions * Add exception catching for pyparsing errors * Update parsing examples * Bump ical to 6.0.0 * Increase test coverage of parse failures * Add coverage for calendar stream parsing * Streamline test coverage * Remove unused exceptions * Fix imports
- Loading branch information
1 parent
99683e6
commit 1e7ba71
Showing
25 changed files
with
163 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
"todo", | ||
"types", | ||
"tzif", | ||
"exceptions", | ||
"util", | ||
"diagnostics", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"""Exceptions for ical library.""" | ||
|
||
|
||
class CalendarError(Exception): | ||
"""Base exception for all ical errors.""" | ||
|
||
|
||
class CalendarParseError(CalendarError): | ||
"""Exception raised when parsing an ical string.""" | ||
|
||
|
||
class RecurrenceError(CalendarError): | ||
"""Exception raised when evaluating a recurrence rule. | ||
Recurrence rules have complex logic and it is common for there to be | ||
invalid date or bugs, so this special exception exists to help | ||
provide additional debug data to find the source of the issue. Often | ||
`dateutil.rrule` has limitataions and ical has to work around them | ||
by providing special wrapping libraries. | ||
""" | ||
|
||
|
||
class StoreError(CalendarError): | ||
"""Exception thrown by a Store.""" | ||
|
||
|
||
class EventStoreError(StoreError): | ||
"""Exception thrown by the EventStore.""" | ||
|
||
|
||
class TodoStoreError(StoreError): | ||
"""Exception thrown by the TodoStore.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.