def __init__(self, message, batch, job_id, status_code, uri, location=None, **kwargs): GraphError.__init__(self, message, **kwargs) self.batch = batch self.job_id = job_id self.status_code = status_code self.uri = uri self.location = location
def __init__(self, graph): if graph is None: raise GraphError( "All auto-generated Cypher statements require a Graph instance" ) self.graph = graph self.nodes = [] self.relationships = []
def __init__(self, message, **kwargs): GraphError.__init__(self, message, **kwargs) if self.request: request_body = json.loads(self.request.body) self.statement = request_body.get("query") self.parameters = request_body.get("params")
def __init__(self, message, **kwargs): GraphError.__init__(self, message, **kwargs) request_body = json.loads(self.request.body) self.query = request_body.get("query") self.params = request_body.get("params")
"""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):