rollback the transaction when an exception occurs

This avoids the "The transaction is marked for rollback only." messages when neo4j tries to reuse the same transaction.