by fail, I don't me crash and burn, but fails some business rule

for example, a product component, initialise with a productID, but if that product does not exist in the database do not return a handle to it.


I am currently setting return type to and and retuning empty string on fail.
Then the caller is testing to see if it has an object -> isObject()


On 8/9/06, Dale Fraser <[EMAIL PROTECTED]> wrote:

I don't think so.

 

CF just doesn't handle nulls.

 

How can an init function fail? And can't you trap this in the CFC rather back in the calling page.

Regards
Dale Fraser

http://dale.fraser.id.au


From: cfaussie@googlegroups.com [mailto: cfaussie@googlegroups.com] On Behalf Of Andrew Mercer
Sent: Wednesday, 9 August 2006 7:34 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] CFC init() return null?

 

with a CFC init function that does a cfreturn this

can you return null if the init fails?

what is the best way to let the caller know the init has failed?

TIA






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to