feat(shared): add kernel exceptions

This commit is contained in:
openclaw 2026-03-23 15:43:37 +00:00
parent e40c2edb8c
commit 4ef972fd53
4 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
class NotFoundError(Exception):
def __init__(self, entity: str, entity_id: str) -> None:
self.entity = entity
self.entity_id = entity_id
super().__init__(f"{entity} not found: {entity_id}")
class ValidationError(Exception):
def __init__(self, message: str) -> None:
self.message = message
super().__init__(message)
class FileSystemError(Exception):
def __init__(self, path: str, message: str) -> None:
self.path = path
self.message = message
super().__init__(f"Filesystem error at {path}: {message}")