[thelist] CF: Determining which DB used.

Bruce Heerssen bruce at heerssen.com
Wed Sep 12 10:07:31 CDT 2001

Raymond Camden wrote:

> I should clarify. There is no HARM per se. It's a personal feeling on my
> part that it's bad form to use CFTRY/CATCH when you _know_ that an error
> is going to occur. Ie, CFTRY/C should not be used as an error suppressor
> for errors you know will happen.
> This is just my two cents.
> There should be little to no real harm in doing this. However, remember
> to use TYPE="..." when you use cfcatch. I've found cfcatch type="any"
> (or with no type, which equals type="any"), to be _much_ slower than
> using a specific type.
> -Ray

As usual, Ray, you are correct. Throwing errors on purpose is generally 
considered bad practice. However, I feel that in certain situations, 
when no other method will work well, it's not that bad. Remember, best 
practices are merely guidelines to be followed where possible.

I still say to the original question: design for portability. Only use 
my method if you *must*. And if you do, follow Ray's suggestion and do 
not use the type="any" attribute, use the type="database" attribute instead.


More information about the thelist mailing list