This got bounced the first time, but..
Although, I have never used cfexit inside a cffunction it does have use other than in custom tags.
For example, on a form processing page, I'll sometimes check for variables being defined.
<cfif Not IsDefined("form.submit") and not isDefined("form.formfield1")>
You got here in error. <br>
<cfexit method="ExitTemplate">
</cfif>It doesn't count as validation of data, only verification that the person submitted all the correct form fields. It is a method to prevent people from going directly to a page. I guess cfabort could be used there too.
The method attribute of cfexit will also accept "loop" as a value. I think it is perfectly reasonable to want to use it to terminate a loop inside a function without actually ending the function's processing.
On a almost un-related note, I've had problems breaking out of the inner loop of a grouped query. I have a vague memory that the reason was that both cfbreak and cfexit would only break out of the cfloop tag, not the cfoutput tag.
At 05:47 PM 6/29/2004, you wrote:
>Vince. As far as I know, CFEXIT only has application in custom tags. As
>for CFABORT, my feelings are that it should be allowed anywhere, and when
>it's encountered, all processing should halt. We use it almost exclusively
>for debugging.
>
>-Rob
>
>
>
>
>"Vince Bonfanti" <[EMAIL PROTECTED]>@cfczone.org on 06/29/2004 02:38:38
>PM
>
>Please respond to [EMAIL PROTECTED]
>
>Sent by: [EMAIL PROTECTED]
>
>
>
>To: <[EMAIL PROTECTED]>
>cc:
>
>
>Subject: [CFCDev] CFEXIT or CFABORT within CFFUNCTION
>
>
>Can anyone think of any legitimate use of CFEXIT or CFABORT with a
>CFFUNCTION? I can't: if the functions finishes normally use CFRETURN, if
>abnormally use CFTHROW.
>
>I can't find any docs that say use of CFEXIT or CFABORT is allowed or
>disallowed within CFFUNCTION. I'd be in favor or saying they're disallowed,
>and have the CFML server (BlueDragon/ColdFusion) throw a syntax error
>("illegal tag nesting", or some such) if they're attempted to be used this
>way.
>
>Any thoughts? Am I missing something?
>
>Vince Bonfanti
>New Atlanta Communications, LLC
>http://www.newatlanta.com
>
>
>
>
>----------------------------------------------------------
>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).--
Jeffry Houser, Web Developer, Writer, Songwriter, Recording Engineer
<mailto:[EMAIL PROTECTED]>
--
AIM: Reboog711 | Phone: 1-203-379-0773
--
My Books: <http://www.instantcoldfusion.com>
Recording Music: <http://www.fcfstudios.com>
Original Energetic Acoustic Rock: <http://www.farcryfly.com>
----------------------------------------------------------
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 www.mail-archive.com/[EMAIL PROTECTED]
