use of org.neo4j.internal.kernel.api.exceptions.TransactionApplyKernelException in project neo4j by neo4j.
the class RecordStorageEngine method apply.
@Override
public void apply(CommandsToApply batch, TransactionApplicationMode mode) throws Exception {
TransactionApplierFactoryChain batchApplier = applierChain(mode);
CommandsToApply initialBatch = batch;
try (BatchContext context = createBatchContext(batchApplier, batch)) {
while (batch != null) {
try (TransactionApplier txApplier = batchApplier.startTx(batch, context)) {
batch.accept(txApplier);
}
batch = batch.next();
}
} catch (Throwable cause) {
TransactionApplyKernelException kernelException = new TransactionApplyKernelException(cause, "Failed to apply transaction: %s", batch == null ? initialBatch : batch);
databaseHealth.panic(kernelException);
throw kernelException;
}
}
Aggregations