diff options
author | Matt Robenolt <matt@ydekproductions.com> | 2013-03-27 23:03:03 -0700 |
---|---|---|
committer | Matt Robenolt <matt@ydekproductions.com> | 2013-03-27 23:03:03 -0700 |
commit | 4a783ba99da9501649bebd8fb1a51d8cc8075c17 (patch) | |
tree | 46dad3e8b2e5b8974d37bb0954d152c4b55651e2 /redis/exceptions.py | |
parent | d7678e0f8b2196316c7f567c762c5b8471426ae1 (diff) | |
download | redis-py-4a783ba99da9501649bebd8fb1a51d8cc8075c17.tar.gz |
A base class for server-side exceptions to be grouped by
This is important if you want to detect if there was an issue that resulted from the server being broken specifically, as opposed to the client issuing a bad command.
See: https://github.com/disqus/nydus/pull/31
Also, let me know if there are other exceptions that could extend the base `ServerError`. These are just the two that stood out.
Diffstat (limited to 'redis/exceptions.py')
-rw-r--r-- | redis/exceptions.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/redis/exceptions.py b/redis/exceptions.py index ffa574b..0d10285 100644 --- a/redis/exceptions.py +++ b/redis/exceptions.py @@ -6,13 +6,16 @@ class RedisError(Exception): class AuthenticationError(RedisError): pass -class ConnectionError(RedisError): +class ServerError(RedisError): pass -class ResponseError(RedisError): +class ConnectionError(ServerError): + pass + +class InvalidResponse(ServerError): pass -class InvalidResponse(RedisError): +class ResponseError(RedisError): pass class DataError(RedisError): |