by fail, I don't me crash and burn, but fails some business rulefor 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
That won't work because the object always is an object, it's just not
initialised.
On 8/9/06, Andrew Mercer [EMAIL PROTECTED] wrote:
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
This question was raised a few years ago on another mailing list, and the concenses to cfc's is varied depending on your rules, and who you talk too.
I sugest that the init function maybe just be an intialisation, and business rules be placed elsehwere, or you could set the returntype = 'any' and
I like the idea of the init() throwing an execptionthen wrap the createObject with a cftry - which it should having anyway :-)Thanks to all that replied.On 8/10/06,
Scott Arbeitman [EMAIL PROTECTED] wrote:
Why can't your CFC just throw an exception? This is the Java way to dothings, are