aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2017-11-24 14:20:27 +0100
committerLorenz Diener <[email protected]>2017-11-24 14:20:27 +0100
commitcea4d4251a0b998ae734811ee78651d60a138d3e (patch)
treed65a8726cd7cb317b820970c8953740a39c46c82 /mastodon/Mastodon.py
parentfa53713abdb7e9fa1385186bd6649cc7317c7855 (diff)
downloadmastodon.py-cea4d4251a0b998ae734811ee78651d60a138d3e.tar.gz
Change exceptions slightly
Diffstat (limited to 'mastodon/Mastodon.py')
-rw-r--r--mastodon/Mastodon.py9
1 files changed, 9 insertions, 0 deletions
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):
1419 1419
1420 1420
1421class MastodonIllegalArgumentError(ValueError, MastodonError): 1421class MastodonIllegalArgumentError(ValueError, MastodonError):
1422 """Raised when an incorrect parameter is passed to a function"""
1422 pass 1423 pass
1423 1424
1424 1425
@@ -1427,16 +1428,24 @@ class MastodonIOError(IOError, MastodonError):
1427 1428
1428 1429
1429class MastodonFileNotFoundError(MastodonIOError): 1430class MastodonFileNotFoundError(MastodonIOError):
1431 """Raised when a file requested to be loaded can not be opened"""
1430 pass 1432 pass
1431 1433
1432 1434
1433class MastodonNetworkError(MastodonIOError): 1435class MastodonNetworkError(MastodonIOError):
1436 """Raised when network communication with the server fails"""
1434 pass 1437 pass
1435 1438
1436 1439
1437class MastodonAPIError(MastodonError): 1440class MastodonAPIError(MastodonError):
1441 """Raised when the mastodon API generates a response that cannot be handled"""
1438 pass 1442 pass
1439 1443
1440 1444
1441class MastodonRatelimitError(MastodonError): 1445class MastodonRatelimitError(MastodonError):
1446 """Raised when rate limiting is set to manual mode and the rate limit is exceeded"""
1447 pass
1448
1449class MastodonMalformedEventError(MastodonError):
1450 """Raised when the server-sent event stream is malformed"""
1442 pass 1451 pass
Powered by cgit v1.2.3 (git 2.41.0)