How many of you check for empty strings in required string-type
arguments?
For example, I have this function:
<cffunction name="mySplit" return="array" ...>
<cfargument name="myList" type="string" required="yes">
<cfreturn listToArray(arguments.myList, ",")>
</cffunction>
Then, I call the function like this:
<cfset result = mySplit("")>
Do you let this function return an empty array or do you throw an error?
What is the general consensus? Should empty strings _always_ be allowed
since they tend to be an exception to required arguments?
Thanks
M!ke
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at
[EMAIL PROTECTED]