tony weeg
sr. web applications architect
navtrak,
inc.
[EMAIL PROTECTED]
www.navtrak.net
office 410.548.2337
fax
410.860.2337
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Raymond Camden
Sent: Tuesday, September 16, 2003 11:09 AM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] qualifying data coming in to cfcThe CFC _does_ do validation, but it _wants_ to throw an error. What I mean is that my code in the method looks like this (PSEUDO-code!)function register(username,password) {if this user exists, cfthrow}There is no need for a cftry/catch inside because I _want_ an error to occur. Make sense?=======================================================================
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 9:05 AM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] qualifying data coming in to cfcso you do not put the cftry/cfcatch block in the cfc, you wrap it around the call to it....any reason?tony weeg
sr. web applications architect
navtrak, inc.
[EMAIL PROTECTED]
www.navtrak.net
office 410.548.2337
fax 410.860.2337-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Raymond Camden
Sent: Tuesday, September 16, 2003 10:54 AM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] qualifying data coming in to cfcYes. 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>=======================================================================
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
