Bryan F. Hogan wrote:
<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>


Hi been reading along for a while now, and am having a great time reading.

One thought on this particular implementation. I can see how this can detect that test.cfc is part of the stack trace, but what if this CFC was called by another CFC that was called by test.cfc. Will test.cfc still be part of the trac,e but not have a correct check that test.cfc is the cfc that is directly calling this cfc?


-- Enjoy, Danilo Celic

| Extending Knowledge, Daily
| http://www.CommunityMX.com/

Those who aren't looking often have their eyes open widest.

----------------------------------------------------------
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