From cea4d4251a0b998ae734811ee78651d60a138d3e Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Fri, 24 Nov 2017 14:20:27 +0100 Subject: Change exceptions slightly --- mastodon/Mastodon.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mastodon/Mastodon.py') diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index ab0071b..c35ad2d 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -1419,6 +1419,7 @@ class MastodonError(Exception): class MastodonIllegalArgumentError(ValueError, MastodonError): + """Raised when an incorrect parameter is passed to a function""" pass @@ -1427,16 +1428,24 @@ class MastodonIOError(IOError, MastodonError): class MastodonFileNotFoundError(MastodonIOError): + """Raised when a file requested to be loaded can not be opened""" pass class MastodonNetworkError(MastodonIOError): + """Raised when network communication with the server fails""" pass class MastodonAPIError(MastodonError): + """Raised when the mastodon API generates a response that cannot be handled""" pass class MastodonRatelimitError(MastodonError): + """Raised when rate limiting is set to manual mode and the rate limit is exceeded""" + pass + +class MastodonMalformedEventError(MastodonError): + """Raised when the server-sent event stream is malformed""" pass -- cgit v1.2.3