You should be checking that whatever you're passing to the function is valid before you pass it (likely using isNumeric()). The error is generated to make sure execution doens't proceed, not to help you catch validation errors.
That being said, you could wrap the method call with a CFTRY block, but you'd have to do it for _every_ call, which would be very messy at best. Or you could use a global exception handler and redirect to an error page, but that'd be fairly useless except to hide the specifics of the problem from the user. barneyb --- Barney Boisvert, Senior Development Engineer AudienceCentral [EMAIL PROTECTED] voice : 360.756.8080 x12 fax : 360.647.5351 www.audiencecentral.com > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Justin Balog > Sent: Monday, July 21, 2003 12:45 PM > To: '[EMAIL PROTECTED]' > Subject: [CFCDev] Argument Type Error > > > > Is there a way to catch an "Argument Type Error"? This is the > error that I > get--- > > The value returned from function getcClerkBusinessOwnershipTypeFK() is not > of type numeric. > > Here is the function: > > <CFFUNCTION access="private" name="getcClerkBusinessOwnershipTypeFK" > returntype="numeric" output="false" displayname="Get Business > Ownership Type > Method" hint="I Get the Business Ownership Types of the account"> > <CFRETURN instance.cClerkBusinessOwnershipTypeFK> > </CFFUNCTION> > > Here is the call to the function: > > myResultStruct.cClerkBusinessOwnershipTypeFK = > getcClerkBusinessOwnershipTypeFK(); > > I was just curious where I should put my error handling > (Try/Catch) in order > to capture the error that occurs? > > Thanks, > > Justin > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email > to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' > in the message of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported > by Mindtool, Corporation (www.mindtool.com). > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003 ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
