It just makes more sense to handle this kind of thing in the cfc than outside. Catch it once inside the cfc for all calls or write error handling code every time you call the function in your code. Which would you prefer? I would, and I guess most developers would choose the handle it once option.
Not really. CFARGUMENT is performaing data type validation. The application making calls on the CFC should *always* be passing in the right variable types -- CFARGUMENT acts to protect the integrity of the function it finds itself in.
If there is any chance that the call to the CFC will pass incorrect data types (eg, from some sort of user input) the input validation should be performed upstream -- ie. not in the component. The component should not have to worry about anything except itself. For example, trapping a database execution error within the function itself is appropriate -- the component should know how to communicate with the database if that is its job -- but it should not have to contend with incorrect data-types other than to refuse to cooperate ;)
In any event, once you have trapped the error in your CF_ARGUMENT tag, what then? Don't you still have to return a result to the script calling your object, and presumably that script has to do something with the error?
Also, CFARGUMENT populates the CFC metadata with information which is essential for the construction of self documentation and WSDL generation.
I love CFARGUMENT. I don't think anyone should be giving it up in a hurry :)
-- geoff http://www.daemon.com.au/
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
