30 lines
705 B
Python
30 lines
705 B
Python
from __future__ import annotations
|
|
|
|
|
|
class DeviceRuntimeError(Exception):
|
|
"""Base error for semantic errors surfaced above the driver layer."""
|
|
|
|
|
|
class DriverError(DeviceRuntimeError):
|
|
"""A driver operation failed."""
|
|
|
|
|
|
class DeviceNotFoundError(DeviceRuntimeError):
|
|
"""A requested device id is unknown."""
|
|
|
|
|
|
class DeviceOfflineError(DeviceRuntimeError):
|
|
"""A device is unavailable or lost its connection."""
|
|
|
|
|
|
class DeviceBusyError(DeviceRuntimeError):
|
|
"""A device is already in use."""
|
|
|
|
|
|
class ElementNotFoundError(DeviceRuntimeError):
|
|
"""A requested screen element was not found."""
|
|
|
|
|
|
class TaskFailedError(DeviceRuntimeError):
|
|
"""A task failed before reaching its goal."""
|