"""Defines standard Neolixir exceptions and imports ``py2neo`` exceptions.""" import traceback import overrides from py2neo.error import GraphError from py2neo.cypher import CypherError from py2neo.batch import BatchError EntityNotFoundException = GraphError.subcls('EntityNotFoundException') NodeNotFoundException = GraphError.subcls('NodeNotFoundException') RelationshipNotFoundException = GraphError.subcls('RelationshipNotFoundException') EndNodeNotFoundException = GraphError.subcls('EndNodeNotFoundException') DeadlockDetectedException = GraphError.subcls('DeadlockDetectedException') GuardTimeoutException = GraphError.subcls('GuardTimeoutException') __all__ = ['GraphError', 'CypherError', 'BatchError', 'EntityNotFoundException', 'NodeNotFoundException', 'RelationshipNotFoundException', 'EndNodeNotFoundException', 'DeadlockDetectedException', 'GuardTimeoutException', 'NeolixirError', 'CommitError', 'QueryError'] class NeolixirError(Exception): """Base class for all Neolixir exceptions.""" pass class CommitError(NeolixirError): """Triggered when an error occurred during session commit.""" def __init__(self, exc_info, saved, pending):