-----Original Message-----
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 10:03 PM
To: CF-Talk
Subject: RE: Can I Throw within <cfscript>???

Bryan,
This is not the same code.  All you are doing is returning from a
function
call.  You are NOT throwing an exception within test.

Andy


-----Original Message-----
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:03 PM
To: CF-Talk
Subject: RE: Can I Throw within <cfscript>???


Here is the answer

<cftry>
        <!--- This line throws error --->
        <cfset test1()>
        <cfcatch type="any">
                <cfoutput>#test(message="CFCatch Exists -
#IsDefined("cfcatch")#")#</cfoutput>
        </cfcatch>
</cftry>
<br>
<cfscript>
        try {
                test1();
        }
        catch(Any excpt) {
                writeoutput(test(message="CFCatch Exists -
#IsDefined("excpt")#"));
        }
</cfscript>

<cffunction name="Test">
        <cfargument name="message">
        <cfset myMessage=Arguments.message>
        <cfreturn myMessage>
</cffunction>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to