Skip to content

Commit

Permalink
Clean up exception API docs.
Browse files Browse the repository at this point in the history
Part of #28.
  • Loading branch information
lemon24 committed May 6, 2018
1 parent 50745cd commit d234688
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 deletions.
38 changes: 23 additions & 15 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,44 @@ Entry Objects
Exceptions
----------

All exceptions that :class:`Reader` explicitly raises inherit from :exc:`ReaderError`.


.. autoclass:: ReaderError
:members:
:inherited-members:

.. autoclass:: FeedError
.. autoexception:: FeedError
:members:
:inherited-members:

.. autoclass:: FeedExistsError
Subclass of :exc:`ReaderError`.

.. autoexception:: FeedExistsError
:members:
:inherited-members:

.. autoclass:: FeedNotFoundError
Subclass of :exc:`FeedError`.

.. autoexception:: FeedNotFoundError
:members:
:inherited-members:

.. autoclass:: ParseError
Subclass of :exc:`FeedError`.

.. autoexception:: ParseError
:members:
:inherited-members:

.. autoclass:: EntryError
Subclass of :exc:`FeedError`.

.. autoexception:: EntryError
:members:
:inherited-members:

.. autoclass:: EntryNotFoundError
Subclass of :exc:`FeedError`.

.. autoexception:: EntryNotFoundError
:members:
:inherited-members:

.. autoclass:: StorageError
Subclass of :exc:`EntryError`.

.. autoexception:: StorageError
:members:
:inherited-members:

Subclass of :exc:`ReaderError`.

8 changes: 7 additions & 1 deletion reader/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ class FeedError(ReaderError):

def __init__(self, url):
super().__init__(url)

#: The feed URL.
self.url = url


class FeedExistsError(FeedError):
"""File already exists."""
"""Feed already exists."""


class FeedNotFoundError(FeedError):
Expand All @@ -32,7 +34,11 @@ class EntryError(ReaderError):

def __init__(self, url, id):
super().__init__(url, id)

#: The feed URL.
self.url = url

#: The entry id.
self.id = id

class EntryNotFoundError(EntryError):
Expand Down

0 comments on commit d234688

Please sign in to comment.