cfdocs

transactionRollback

Rollback current transaction

transactionRollback([savepoint])
returns void

Argument Reference

Name Type Required Default Description
savepoint string No   Name of the savepoint to roll back to

Script Syntax

In this code, any error triggered will cause transactionRollback() to run and roll back the pending transaction

transaction { 
 try { 
 // code to run 
 transactionCommit(); 
 } 
 catch(any e) { 
  transactionRollback(); 
  } 
 }