msgpack pack and unpack throws only exception that inherit from MsgpackBaseException. cython and fallback throws same exceptions

This commit is contained in:
palaviv 2016-02-12 11:00:39 +02:00
parent 82b3121507
commit 7d2d46effc
4 changed files with 71 additions and 52 deletions

View file

@ -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