Helpers to authenticate and programmatically use external websites.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

34 lines
1004 B

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)