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 return either an object or an empty string, or as Dale has suggested but constructors usually shouldn't fail for any reason to begin with anyway.
 
But if you must, why not create a private method to run the business logic, and have the init still return the this object, then use getters and setters to determine if the logic has failed.
 
But as it was suggested on the cfcdev list, rule of thumb the init should never fail anything unless you want to wrap code around your create objects all the time.

 

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