Skip to main content
Inspiring
February 23, 2009
Question

How to break?

  • February 23, 2009
  • 1 reply
  • 541 views
I'm looping within my structure elements and doing either cfswitch or cfif cfelse conditions
if I found a bad record I need to send out email and this record should not be inserted into db while the loop should keep looping if the the next set of record is good records. How can I do this? please help. Thanks!!!
This topic has been closed for replies.

1 reply

Inspiring
February 23, 2009
<cfif testToSeeIfRecordIsBad>
Send Email
<cfelse>
Insert into database
</cfif>

OR

<cfif testToSeeIfRecordIsGood>
Insert into database
<cfelse>
Send Email
</cfif>

OR

<cftry>
Do something that may throw exception.
<cfcatch...>
Do something because exception was thrown.
</cfcatch>
<cftry>

OR

Any other type of branching logic you care to employ.