Oh - I thought you meant handling the exceptions in CALLING the method,
ie:
(assume ob is a cfc instance)
<cftry>
<cfset res = ob.foo(x)>
<cfcatch ...>
..
</cfcatch>
</cftry>
What you seem to want to do is not something you can do - if you want to
be able to handle, inside the method, argument issues, then you would
NOT use cfargument tags. Instead, you would example the arguments
array/struct and handle crap there.
=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire
Email : [EMAIL PROTECTED]
WWW : www.camdenfamily.com/morpheus
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: webguy [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 04, 2002 9:16 AM
> To: CF-Talk
> Subject: RE: Catching exceptions in cfc
>
>
> so
>
> <cffunction
> <cftry>
> <cfargument
> <cfcatch>
> </cfcatch>
> </cftry>
>
> function body
> </cffunction>
>
> is the best way ? is there a more elegant solution for
> reporting validation errors?
>
> WG
>
>
> Jedi Master>>
> > It would no different then catching any other exception. try/catch
> > should work fine.
>
> > > Anyone got a tutorial / examples with dealing with
> exceptions in a
> > > cfc , especially catching validation errors thrown from
> <cfargument
> > > type=""...
> > >
> > > Thanks
> > >
> > > WG
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com