Skip to content

Commit ddf8efa

Browse files
+ Added optional additional info to valaidation error
1 parent 4f97cab commit ddf8efa

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/thread/exceptions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,6 @@ def __init__(self, method_name: str) -> None:
6666
class ArgumentValidationError(ErrorBase):
6767
"""Exception class for when validating arguments passed to the wrapped method fails"""
6868
message: str = 'Validation for arguments passed to the wrapped method failed'
69+
70+
def __init__(self, additional: Optional[str] = '') -> None:
71+
super().__init__(self.message + f'\n{additional}')

0 commit comments

Comments
 (0)