I think an example may explain what I am talking about. I have a CFC that has a data structure that contains one or more queries of demographic data about a person based on their role(s). For example a person may be a donor and a mobile chair person. Thus the structure would contain two queries, a donor query and a mobile query {basicData.donor, basicData.Mobile}. Now to retrieve this data and use it I have a function that returns one of these queries based on the role requested. This is pretty easy: <cfreturn basicData[role]>.
It occurs to me though that I should probably error catch that the role passed to the function actually exists and if not return an appropriate error, but how do I do this. The place I get lost at is the function returning the data has been designed to expect to return a query {<cffunction name="displayBasicData" access="public" output="false" returntype="query...>}. So if I place code there to capture and return an error how would I do this with the function expecting to return a query? obviously I could not declare the return type and/or allow output in the function but neither of these seem very proper to me!
Thanks for your expertise.
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
Confidentiality Notice: This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

