mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-20 07:14:20 +01:00
Add hierarchy logic to custom exceptions.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from .exceptions import LabelerSerializerException
|
||||
|
||||
from typing import Generic, TypeVar, Iterable, Optional, List, Any
|
||||
|
||||
T = TypeVar("T")
|
||||
@@ -10,7 +12,7 @@ class _Serializer(Generic[T]):
|
||||
labels = list(filter(lambda label: label not in (skip or list()), self.__labels))
|
||||
|
||||
if len(labels) > len(args):
|
||||
raise Exception("<labels> and <*args> arguments should contain the same amount of elements.")
|
||||
raise LabelerSerializerException("<labels> and <*args> arguments should contain the same amount of elements.")
|
||||
|
||||
for index, label in enumerate(labels):
|
||||
if label not in self.__IGNORE:
|
||||
|
||||
Reference in New Issue
Block a user