PythonRMV/src/pyrmv/errors/unknown_error.py
profitroll f31fa65d78
Some checks reported warnings
Tests / test (3.11) (push) Has been cancelled
Tests / test (3.8) (push) Has been cancelled
Tests / test (3.9) (push) Has been cancelled
Tests / test (3.10) (push) Has been cancelled
Small refactor and isort+black formatting
2023-11-24 11:21:02 +01:00

16 lines
481 B
Python

class UnknownError(Exception):
"""Exception raised but error is not known.
### Attributes:
* errorCode: Client error code from HAFAS ReST Request Errors.
* errorText: Description of an error occurred.
"""
def __init__(self, errorCode: str, errorText: str):
self.errorCode = errorCode
self.errorText = errorText
super().__init__(self.errorText)
def __str__(self):
return f"{self.errorCode} -> {self.errorText}"