Thanks David

this works but I was kind of hoping it worked more like CFIF or CFSWITCH
like below

<cftry>
        <cffile action="WRITE" ......>
        <cfcatch type="Any">
                <cfset success = false>
                The file could not be updated. File is locked or read only.
        </cfcatch>
        <cfcatch type="NoError">
                The file updated.
        </cfcatch>
</cftry>




Cheers,
Duane




-----Original Message-----
From: David Gassner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 29, 2000 1:12 PM
To: [EMAIL PROTECTED]
Subject: RE: CFTry Question


How about...

<cfset success=true>
<cftry>
        <cffile action="WRITE" ......>
        <cfcatch type="Any">
                <cfset success = false>
                The file could not be updated. File is locked or read only.
        </cfcatch>
</cftry>

<cfif success>
        ....Display success message...
</cfif>

> I have wrapped cftry around a cfflile call to intercept error messages if
> the file can not be updated but I want to return a success message if the
> was no errors. Here is what I have:
>
> <cftry>
>       <cffile action="WRITE" ......>
>       <cfcatch type="Any">
>               The file could not be updated. File is locked or read only.
>       </cfcatch>
> </cftry>
>

----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to