Dominic O'Connor said the following on 05/19/2011 06:51 AM:
> Hi,
> We're periodically getting this Element "DATA is undefined in
> DATASTORAGE" from the MachII Dashboard at line 168 of \MachIIDashboard
> \logging\loggers\ExceptionLog\Logger.cfc.  Has anyone else seen it?
Are you doing something to the application scope like clearing it during
a request?  The relevant code is below.  It appears to be failing on this:

<cfset ArrayDeleteAt(dataStorage.data, ArrayLen(dataStorage.data)) />

Which is strange because it's not failing on the loop condition but the
inner statement.  It's probably a race condition -- possibly with the
"flush" action due to array.

Dominic, would you please file a ticket regarding this?  Thanks -- it's
probably something we can shore up in the 1.9.

http://trac.mach-ii.com/machii/newticket

Code:

    <cffunction name="getDataStorage" access="public"
returntype="struct" output="false"
        hint="Gets a reference to the data storage and creates it if is
not available.">
        <cfargument name="flush" type="boolean" required="false"
default="false" />
       
        <cfset var dataStorage = "" />
       
        <cfif NOT StructKeyExists(application,
"#getAppKey()#._MachIIExceptionLoggerData")
            OR arguments.flush>
            <cfset application[getAppKey()]._MachIIExceptionLoggerData =
StructNew() />
            <cfset
application[getAppKey()]._MachIIExceptionLoggerData.data = ArrayNew(1) />
        </cfif>
       
        <cfset dataStorage =
application[getAppKey()]._MachIIExceptionLoggerData />
       
        <cfloop condition="ArrayLen(dataStorage.data) GT
getMaximumExceptions()">
            <cfset ArrayDeleteAt(dataStorage.data,
ArrayLen(dataStorage.data)) />
        </cfloop>
       
        <cfreturn dataStorage />
    </cffunction>

-- 
Peter J. Farrell
[email protected]
[email protected]
http://blog.maestropublishing.com
Identi.ca / Twitter: @maestrofjp

-- 
To post to this group, send email to [email protected]
For more options and to unsubscribe, visit this group at 
http://groups.google.com/group/mach-ii-for-coldfusion?hl=en

SVN: http://svn.mach-ii.com/machii/
Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/

Reply via email to