Yes.
For example, I have a register method of my User CFC that allows me to register
a new user. It will throw an error if the user already exists. For security
reasons, I don't expose my userExists method. So I just wrap the call to
register w/ try catch.
<!--- Attempt to register
--->
<cftry>
<cfinvoke component="cflib.cfcs.user" method="register">
<cfinvokeargument name="username" value="#form.emailAddy#">
<cfinvokeargument name="password" value="#form.password#">
</cfinvoke>
<cfcatch>
<cfset errorMsg = cfcatch.message>
</cfcatch>
</cftry>
<cftry>
<cfinvoke component="cflib.cfcs.user" method="register">
<cfinvokeargument name="username" value="#form.emailAddy#">
<cfinvokeargument name="password" value="#form.password#">
</cfinvoke>
<cfcatch>
<cfset errorMsg = cfcatch.message>
</cfcatch>
</cftry>
=======================================================================
Raymond
Camden, ColdFusion Jedi Master for Mindseye, Inc
Member of Team
Macromedia
Email :
[EMAIL PROTECTED]
Blog :
www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus
"My ally is the
Force, and a powerful ally it is." - Yoda
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tony Weeg
Sent: Tuesday, September 16, 2003 8:49 AM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] qualifying data coming in to cfcnow do you wrap your in-cfc cfml code in cftry/cfcatch block to further prevent and trap errors?tony weeg
