I have a scheduled program that does transaction processing. I think I am OK with CFTRANSACTION to commit or rollback based on "logical errors". I'd like to integrate CFTRY/CFCATCH to be able to continue processing on "hard errors" that end the processing.
To avoid the nitty gritty, here is the pseudo code of my process:
<cfquery name="getTransactions" datasource="#application.dsn#">
Select * from MyTransactions where RunDate = '#toDay#'
<cfinvoke component="transaction-methods" method="process Transactions" returnvariable="ans">
<cfinvokeargument name="runDate" value="#toDay#">
<cfif ans eq "OK">
Log sucess details to a log file
<CFTRANSACTION ACTION="COMMIT" />
log error to log file
<CFTRANSACTION ACTION="ROLLBACK" />
So, I am not sure where to put the try/catch to be able to rollback the transaction in error, log it and continue to the next.
Thanks in advance,