Title: Message
Jason wrote:
 
> Now regarding CFC's, CF's hybrid approach (ie. limited type checking) provides some built in type checking, albeit at runtime, but why not leverage
> that feature in the same manner you are leveraging the lack of type checking. 
 
Because most of the time, you're better to deliberately test for preconditions as you can handle the error more flexibly that the method just failing.
 
At the one extreme, if it is user input, you should ALWAYS validate for malformed requests on production systems. I typically use regex's and cfparams on the front end along with cfqueryparams on the back end. If it is a special (but reasonable) case in the program, again you should write code to appropriately handle the case.
 
I tend to agree that on the whole if you get a system error message you have failed. You didn't think of something. It should be logged, you should be notified and a pretty error screen should be displayed. Whenever you get some downtime you then figure out what the special case was and write something to handle it more gracefully.
 
Just my 2c worth.
 
Best Wishes,
Peter 
 
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to