G'day
Wouldn't be most appropriate behaviour be to do whatever CF does in the
same situation?  Shouldn't that be the answer to all questions like
this, most sensibly?


Adam Cameron
Senior Application Developer
Straker Interactive

Ph: +64 9 3605034
Fx: +64 9 3605870
Email: [EMAIL PROTECTED]



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Stephen Milligan
Sent: Wednesday, 30 June 2004 10:19 a.m.
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] CFEXIT or CFABORT within CFFUNCTION


Given that there is an alternative for CFEXIT and the behaviour is
potentially confusing I think it would make perfect sense if BlueDragon
threw a parser error if CFEXIT was encountered in a CFC method. That
could then be documented and the problem would be a whole lot easier for
everyone to deal with.

my 2c

Spike

--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org 


 

>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Vince Bonfanti
>Sent: Tuesday, June 29, 2004 2:13 PM
>To: [EMAIL PROTECTED]
>Subject: RE: [CFCDev] CFEXIT or CFABORT within CFFUNCTION
>
>So what's the "current template" when you're executing within a CFC 
>function?
>
>Actually, this is a trick question, since I know the answer.
>On CFMX, doing
>CFEXIT METHOD="exittemplate" within a CFC function has the 
>same effect as
>CFRETURN without a return variable. That is, control goes back to the
>caller. BlueDragon considers the caller to be the "current template". A
>BlueDragon customer brought this discrepancy to our attention, 
>which is why
>I asked.
>
>I can see use of CFEXIT within a CFFUNCTION UDF, but would
>still claim it
>makes not sense within a CFC function.
>
>Vince
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Barney Boisvert
>> Sent: Tuesday, June 29, 2004 6:01 PM
>> To: [EMAIL PROTECTED]
>> Subject: RE: [CFCDev] CFEXIT or CFABORT within CFFUNCTION
>> 
>> You can use CFEXIT METHOD="exittemplate" anywhere to abort
>> the current template, but not the request.  I don't use it 
>> much, but it's occasionally useful where you'd otherwise have 
>> to put an entire file (generally a FB
>> fuse) inside a conditional.  I think it helps with 
>> readability to say "if this isn't true, don't execute the 
>> fuse" at the top of the file, rather than wrapping the entire 
>> content inside a CFIF block.  This is a poor example, but 
>> when the "big nastiness" is more than 30-40 lines, and has a 
>> lot of nested conditionals or whatever, you start to see the 
>> benefit to readability.
>> 
>>   <cfif someTest>
>>     <!--- big nastiness --->
>>   </cfif>
>> 
>> Versus
>> 
>>   <cfif NOT someTest>
>>     <cfexit method="exittemplate" />
>>   </cfif>
>>   
>>   <!--- big nastiness --->
>> 
>> Cheers,
>> barneyb
>> 
>> > -----Original Message-----
>> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

>> > Behalf Of [EMAIL PROTECTED]
>> > Sent: Tuesday, June 29, 2004 2:47 PM
>> > To: [EMAIL PROTECTED]
>> > Subject: Re: [CFCDev] CFEXIT or CFABORT within CFFUNCTION
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 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
>
>
>----------------------------------------------------------
>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]

----------------------------------------------------------
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]
----------------------------------------------------------
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]

Reply via email to