File size: 904 Bytes
1905805 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | class UnknownOpType(Exception):
def __init__(self, op_type: str):
super().__init__("No operation of type {}".format(op_type))
class UnknownOpRole(Exception):
def __init__(self, op_role: str):
super().__init__("No operation of role {}".format(op_role))
class UnknownOpID(Exception):
def __init__(self, op_type: str, op_id):
super().__init__("No operation of type {} with id {}".format(op_type, op_id))
class DuplicateFilter(Exception):
def __init__(self, op_type: str, op_id):
super().__init__("Can not add already active {} {}".format(op_type, op_id))
class OperationUnloaded(Exception):
def __init__(self, op_type: str, op_id: str = None):
if op_id: super().__init__("No operation {} with id {} loaded".format(op_type, op_id))
else: super().__init__("No operation of type {} loaded".format(op_type)) |