class HTTPError(Exception):
|
|
def __init__(self, ans):
|
|
self.ans = ans
|
|
self.status_code = ans.status_code
|
|
super().__init__(f"Unexpected Status Code: {self.status_code}")
|
|
|
|
|
|
class TooManyFormsError(Exception):
|
|
def __init__(self, res, filters):
|
|
self.res = res
|
|
self.filters = filters
|
|
message = f"Too many forms matched the filters: {filters}."
|
|
super().__init__(message)
|
|
|
|
|
|
class FormNotFoundError(Exception):
|
|
def __init__(self, res, filters):
|
|
self.res = res
|
|
self.filters = filters
|
|
message = f"No forms matched the filters: {filters}."
|
|
super().__init__(message)
|
|
|
|
|
|
class NoFormSelectedError(Exception):
|
|
def __init__(self, function):
|
|
message = (f"Function '{function}' has been called before selecting "
|
|
f" any form.")
|
|
super().__init__(message)
|
|
|
|
|
|
class RemoteException(Exception):
|
|
def __init__(self, message, ans):
|
|
self.ans = ans
|
|
super().__init__(message)
|