Small refactor and isort+black formatting
This commit is contained in:
@@ -12,134 +12,160 @@ class SvcParamError(Exception):
|
||||
super().__init__(self.errorText)
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.errorCode} -> {self.errorText}'
|
||||
return f"{self.errorCode} -> {self.errorText}"
|
||||
|
||||
|
||||
class SvcLocationError(Exception):
|
||||
"""
|
||||
Location missing or invalid.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcLocationArrivalError(Exception):
|
||||
"""
|
||||
Arrival location missing or invalid.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcLocationDepartureError(Exception):
|
||||
"""
|
||||
Departure location missing or invalid.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcLocationViaError(Exception):
|
||||
"""
|
||||
Unknown change stop.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcLocationEqualError(Exception):
|
||||
"""
|
||||
Origin/destination or vias are equal.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcLocationNearError(Exception):
|
||||
"""
|
||||
Origin and destination are too close.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcDatetimeError(Exception):
|
||||
"""
|
||||
Date/time are missing or invalid.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcDatetimePeriodError(Exception):
|
||||
"""
|
||||
Date/time are not in timetable or allowed period.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcProductError(Exception):
|
||||
"""
|
||||
Product field missing or invalid.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcContextError(Exception):
|
||||
"""
|
||||
Context is invalid.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcNoResultError(Exception):
|
||||
"""
|
||||
No result found.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcSearchError(Exception):
|
||||
"""
|
||||
Unsuccessful search.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
|
||||
|
||||
class SvcNoMatchError(Exception):
|
||||
"""
|
||||
No match found.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.__doc__)
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__
|
||||
return self.__doc__
|
||||
|
Reference in New Issue
Block a user