Search in sources :

Example 6 with TransactionException

use of org.neo4j.ogm.exception.TransactionException in project neo4j-ogm by neo4j.

the class EmbeddedTransaction method commit.

@Override
public void commit() {
    try {
        if (transactionManager.canCommit()) {
            LOGGER.debug("Committing native transaction: {}", nativeTransaction);
            nativeTransaction.commit();
            nativeTransaction.close();
        }
    } catch (Exception e) {
        throw new TransactionException(e.getLocalizedMessage(), e);
    } finally {
        super.commit();
    }
}
Also used : TransactionException(org.neo4j.ogm.exception.TransactionException) TransactionException(org.neo4j.ogm.exception.TransactionException)

Aggregations

TransactionException (org.neo4j.ogm.exception.TransactionException)6 ClientException (org.neo4j.driver.exceptions.ClientException)2 ConnectionException (org.neo4j.ogm.exception.ConnectionException)2 CypherException (org.neo4j.ogm.exception.CypherException)2 BaseTest (de.fraunhofer.aisec.cpg.BaseTest)1 TestUtils (de.fraunhofer.aisec.cpg.TestUtils)1 TranslationException (de.fraunhofer.aisec.cpg.frontends.TranslationException)1 de.fraunhofer.aisec.cpg.graph (de.fraunhofer.aisec.cpg.graph)1 ConstructorDeclaration (de.fraunhofer.aisec.cpg.graph.declarations.ConstructorDeclaration)1 FunctionDeclaration (de.fraunhofer.aisec.cpg.graph.declarations.FunctionDeclaration)1 TranslationUnitDeclaration (de.fraunhofer.aisec.cpg.graph.declarations.TranslationUnitDeclaration)1 Properties (de.fraunhofer.aisec.cpg.graph.edge.Properties)1 PropertyEdge (de.fraunhofer.aisec.cpg.graph.edge.PropertyEdge)1 de.fraunhofer.aisec.cpg.graph.statements (de.fraunhofer.aisec.cpg.graph.statements)1 BinaryOperator (de.fraunhofer.aisec.cpg.graph.statements.expressions.BinaryOperator)1 CallExpression (de.fraunhofer.aisec.cpg.graph.statements.expressions.CallExpression)1 DeclaredReferenceExpression (de.fraunhofer.aisec.cpg.graph.statements.expressions.DeclaredReferenceExpression)1 NodeComparator (de.fraunhofer.aisec.cpg.helpers.NodeComparator)1 SubgraphWalker (de.fraunhofer.aisec.cpg.helpers.SubgraphWalker)1 Util (de.fraunhofer.aisec.cpg.helpers.Util)1