Those CFABORT tags will never execute, because the CFRETURN tags will
return control back to the calling code.  Smarter compilers will
generate a compile-time warning about it.

In general, your CFC should never use CFABORT.  CFRETURN and CFTHROW
provide the same functionality (from the CFC's point of view), but
don't kill the calling code as well.  Of course, during debugging, a
CFABORT tag can be very handy, but I assume you're talking about
production code.

cheers,
barneyb

On 12/5/05, Mike | NZSolutions Ltd <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> Just a quick question, is it good practice to use a cfabort in a .cfc
> file?
>
> Basically...
>
> <cfif a = b>
>         <cfreturn 1/>
>         <cfabort>
> <cfelseif a = c>
>         <cfreturn 0/>
>         <cfabort>
> <cfelse>
>         <cfreturn -1/>
> </cfif>
>
> mike
>
>

--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226140
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to