Now, that's much nicer! :-)

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Roland Collins
Sent: Thursday, January 15, 2004 6:16 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Making sure is not called out of sequence


Doh!  Talk about over-engineered . . . you just made me realize I
overlooked the obvious.  Instead of java, this would have been much
easier (and safer) don using CF exceptions! <kicks himself in the butt>.
Ah well.

<CFFUNCTION NAME="test" ACCESS="public" RETURNTYPE="void" OUTPUT="true">

<CFSET sRequiredCFC = "test1.cfc">
<CFSET sRequiredCFC = "cf" & Replace(sRequiredCFC, ".", "2e")>

<CFTRY>
        <CFTHROW TYPE="Test" MESSAGE="TestMessage">
        <CFCATCH TYPE="any">
                <CFSET sStack = cfcatch.StackTrace>
        </CFCATCH>
</CFTRY>

<CFIF Find(sRequiredCFC, sStack)>
        Called by test1.cfc
<CFELSE>
        Not called by test1.cfc
</CFIF>
</CFFUNCTION>


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to