class ParamError(Exception):
def __init__(self, error_msg):
super().__init__()
self.error_msg = error_msg
def __str__(self):
return "ParamError: %s" % self.error_msg
class LiteDeviceConnectError(Exception):
def __init__(self, error_msg):
super().__init__()
self.error_msg = error_msg
def __str__(self):
return "LiteDeviceConnectError: %s" % self.error_msg
class DeviceNotExistError(Exception):
def __init__(self, error_msg):
super().__init__()
self.error_msg = error_msg
def __str__(self):
return "DeviceNotExistError: %s" % self.error_msg
class DeviceCommandRejectedException(Exception):
"""
Exception thrown when device refuses a command.
"""
def __init__(self, value):
super().__init__()
self.value = value
def __str__(self):
return "DeviceCommandRejectedException: %s" % self.value
class ShellCommandUnresponsiveException(Exception):
"""
Exception thrown when a shell command executed on a device takes
too long to send its output.
"""
def __str__(self):
return "ShellCommandUnresponsiveException"