orchestrata_ultimate.knowledge_graph.exceptions
Reference › orchestrata_ultimate › knowledge_graph › exceptions
The exception hierarchy for the knowledge_graph package (Spec 008). Everything derives from KnowledgeGraphError, which carries a details string next to the message, so callers can catch the whole family with one clause. The subclasses name the failing layer: GraphConnectionError for a failed connection, GraphQueryError (also keeps the offending query), GraphSchemaError for constraint and index operations, ParseError and SyncError (both keep a file_path), TemporalError for versioning, and OwnershipError, which records the agent_id and node_id of a PAM++ ownership violation and is traced to REQ-008-031. It is imported by graph_client, sync and the orchestrator impact analyzer. The module has no behaviour beyond storing these fields.
At a glance
| Source | src/orchestrata_ultimate/knowledge_graph/exceptions.py |
| Lines of code | 59 |
| Classes | 8 |
| Functions | 0 |
| Imports (internal) | orchestrata_ultimate.core.base.traces |
| Imported by | orchestrata_ultimate.knowledge_graph.graph_client, orchestrata_ultimate.knowledge_graph.sync, orchestrata_ultimate.orchestrator.impact.dependency_analyzer |
| Tests that import it | tests/knowledge_graph/test_exceptions.py, tests/knowledge_graph/test_graph_client_coverage.py, tests/knowledge_graph/test_knowledge_graph_client.py, tests/knowledge_graph/test_knowledge_schema.py, tests/knowledge_graph/test_knowledge_signatures.py, tests/knowledge_graph/test_sync_edge_completeness_regression.py |
Class diagram
Dependency diagram
API
Classes
KnowledgeGraphError
Bases: Exception · Line 8
Base exception for knowledge graph operations.
| Method | Signature | Summary |
|---|---|---|
__init__ |
__init__(message: str, details: str = '') -> None |
GraphConnectionError
Bases: KnowledgeGraphError · Line 16
Failed to connect to the graph.
GraphQueryError
Bases: KnowledgeGraphError · Line 20
Query execution failed.
| Method | Signature | Summary |
|---|---|---|
__init__ |
__init__(message: str, query: str = '', details: str = '') -> None |
GraphSchemaError
Bases: KnowledgeGraphError · Line 28
Schema operation failed.
ParseError
Bases: KnowledgeGraphError · Line 32
Code parsing failed.
| Method | Signature | Summary |
|---|---|---|
__init__ |
__init__(message: str, file_path: str = '', details: str = '') -> None |
SyncError
Bases: KnowledgeGraphError · Line 40
File synchronization failed.
| Method | Signature | Summary |
|---|---|---|
__init__ |
__init__(message: str, file_path: str = '', details: str = '') -> None |
TemporalError
Bases: KnowledgeGraphError · Line 48
Temporal versioning error.
OwnershipError
Bases: KnowledgeGraphError · Decorators: traces(spec='008', story='US-001', reqs=['REQ-008-031']) · Line 53
PAM++ ownership violation.
| Method | Signature | Summary |
|---|---|---|
__init__ |
__init__(message: str, agent_id: str = '', node_id: str = '') -> None |
Source
"""Knowledge Graph exception hierarchy."""
from orchestrata_ultimate.core.base.traces import traces
# Spec: 008 - Knowledge Graph
class KnowledgeGraphError(Exception):
"""Base exception for knowledge graph operations."""
def __init__(self, message: str, details: str = "") -> None:
self.details = details
super().__init__(message)
class GraphConnectionError(KnowledgeGraphError):
"""Failed to connect to the graph."""
class GraphQueryError(KnowledgeGraphError):
"""Query execution failed."""
def __init__(self, message: str, query: str = "", details: str = "") -> None:
self.query = query
super().__init__(message, details)
class GraphSchemaError(KnowledgeGraphError):
"""Schema operation failed."""
class ParseError(KnowledgeGraphError):
"""Code parsing failed."""
def __init__(self, message: str, file_path: str = "", details: str = "") -> None:
self.file_path = file_path
super().__init__(message, details)
class SyncError(KnowledgeGraphError):
"""File synchronization failed."""
def __init__(self, message: str, file_path: str = "", details: str = "") -> None:
self.file_path = file_path
super().__init__(message, details)
class TemporalError(KnowledgeGraphError):
"""Temporal versioning error."""
@traces(spec="008", story="US-001", reqs=["REQ-008-031"])
class OwnershipError(KnowledgeGraphError):
"""PAM++ ownership violation."""
def __init__(self, message: str, agent_id: str = "", node_id: str = "") -> None:
self.agent_id = agent_id
self.node_id = node_id
super().__init__(message)