Add hierarchy logic to custom exceptions.

This commit is contained in:
Davide Casale
2022-12-15 19:14:00 +01:00
parent c9f86d6d03
commit 24b105378a
3 changed files with 27 additions and 3 deletions

18
bfxapi/exceptions.py Normal file
View File

@@ -0,0 +1,18 @@
__all__ = [
"BfxBaseException",
"LabelerSerializerException"
]
class BfxBaseException(Exception):
"""
Base class for every custom exception in bfxapi/rest/exceptions.py and bfxapi/websocket/exceptions.py.
"""
pass
class LabelerSerializerException(BfxBaseException):
"""
This exception indicates an error thrown by the _Serializer class in bfxapi/labeler.py.
"""
pass