summaryrefslogtreecommitdiff
path: root/msgpack/exceptions.py
diff options
context:
space:
mode:
authorpalaviv <palaviv@gmail.com>2016-02-12 11:00:39 +0200
committerpalaviv <palaviv@gmail.com>2016-02-12 11:00:39 +0200
commit7d2d46effce37f9fbf394fac74d380aaa7c95f02 (patch)
treede896ab281c25da5a17d416a707b5e79c4bab094 /msgpack/exceptions.py
parent82b31215079bc47bd4d5a8f3c18d83ac73c8221b (diff)
downloadmsgpack-python-7d2d46effce37f9fbf394fac74d380aaa7c95f02.tar.gz
msgpack pack and unpack throws only exception that inherit from MsgpackBaseException. cython and fallback throws same exceptions
Diffstat (limited to 'msgpack/exceptions.py')
-rw-r--r--msgpack/exceptions.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/msgpack/exceptions.py b/msgpack/exceptions.py
index f7678f1..e0d5b5f 100644
--- a/msgpack/exceptions.py
+++ b/msgpack/exceptions.py
@@ -1,4 +1,8 @@
-class UnpackException(Exception):
+class MsgpackBaseException(Exception):
+ pass
+
+
+class UnpackException(MsgpackBaseException):
pass
@@ -22,8 +26,12 @@ class ExtraData(ValueError):
def __str__(self):
return "unpack(b) received extra data."
-class PackException(Exception):
+class PackException(MsgpackBaseException):
pass
class PackValueError(PackException, ValueError):
pass
+
+
+class PackOverflowError(PackValueError, OverflowError):
+ pass