At 03:01 PM 6/3/2004, you wrote: > I just read through the whole thread. > I do not understand why what you describe below wouldn't work. > >>If it's a query it has two columns. (errorCode, errorMessage) >> >>If it's a string it returns an xml string with an errorCode and errorMessage >>branches. >> >>If it's a struct it returns an errorCode and errorMessage key. >> >>If it's an array it returns an array position 1 for the errorcode and position 2 for >>the errormessage. >> >>If it's numeric is returns the errorcode.
How does the error message get returned with the Numeric return type? You've got the error number, but no message. If the client is expecting a message with each exception, this will throw them off. Documenting this is nuts, too! You could create 1 CFC that accepts a service name and a struct of arguments, CFTRYs to call that service, passing in the args struct, and returns a "com.mydomain.invalid_input_argument" exception with a detailed error message if an error is thrown. If not, it returns the proper data type. This way your client checks for 1 exception type! Having to "decode" the exception format based on the function's return type is a recipe for disaster! -- Alex ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
