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.

46 lines
1.2 KiB

"""
ADB异常类
"""
from .base import BusinessError
class AdbError(BusinessError):
"""ADB基础异常类"""
def __init__(self, message: str, error_code: str = "ADB_ERROR"):
super().__init__(message, error_code)
class AdbConnectionError(AdbError):
"""ADB连接错误"""
def __init__(self, message: str):
super().__init__(message, "ADB_CONNECTION_ERROR")
class AdbProtocolError(AdbError):
"""ADB协议错误"""
def __init__(self, message: str):
super().__init__(message, "ADB_PROTOCOL_ERROR")
class AdbDeviceNotFoundError(AdbError):
"""ADB设备未找到错误"""
def __init__(self, message: str):
super().__init__(message, "ADB_DEVICE_NOT_FOUND")
class AdbCommandTimeoutError(AdbError):
"""ADB命令超时错误"""
def __init__(self, message: str):
super().__init__(message, "ADB_COMMAND_TIMEOUT")
class AdbServerError(AdbError):
"""ADB服务器错误"""
def __init__(self, message: str):
super().__init__(message, "ADB_SERVER_ERROR")
class AdbAuthenticationError(AdbError):
"""ADB认证错误"""
def __init__(self, message: str):
super().__init__(message, "ADB_AUTHENTICATION_ERROR")