コード例 #1
0
ファイル: core.py プロジェクト: Spanarchie/Heroku
 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
コード例 #2
0
 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
コード例 #3
0
 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 = []
コード例 #4
0
ファイル: core.py プロジェクト: Sapphirine/stackexchange
 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")
コード例 #5
0
ファイル: error.py プロジェクト: EricEllett/py2neo
 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")
コード例 #6
0
ファイル: core.py プロジェクト: Sapphirine/stackexchange
 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")
コード例 #7
0
ファイル: exc.py プロジェクト: Didacti/neolixir
"""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):