Does cfcatch start processing?

I have a ColdFusion query and I am looping through the output. I need try/catch

it because there may be times when the query output does not quite match the information I am processing. It MUST match, but I believe I am counting on it. However, if there is a discrepancy, no harm is done. I just want to skip this transaction and continue. I don't want ColdFusion to throw an error, stop the process and upset my users.

In code like the one below, will the loop continue processing if it hits the "catch" clause? In the docs I've found that don't seem to address this question, it doesn't seem to be.

<cfoutput query = "xyz">
<cftry>
   do something with this line of query output ...
   <cfcatch type = "any">
   no action, just continue with the loop ...
   </cfcatch>
</cftry>
</cfoutput>

      

+3


source to share


1 answer


An empty blocking block will silently ignore the error and continue processing. You should probably at least log the error, even though you know something is not working.



All that has been said, there are probably better ways of detecting code problems than trying / trickery. I don’t understand what you mean when you say, β€œthe request [may not match] is exactly the same as the information I am processing,” so I cannot provide a more specific example.

+4


source







All Articles