The reason you're getting a grey box from time to time is normally
because CFMX is encountering a compile time error rather than a runtime
error. In an live environment it would be very unusual to get that sort
of thing, because your templates have probably already all been compiled
and tested.
To answer your original question, when you do this:
<cfloop collection=#error# item="i">
<cfif i is not "generatedcontent">
#i# #evaluate("error.#i#")#<br>
</cfif>
</cfloop>
You are assuming that the error[i] will always be a simple value.
You could modify the code to look like this to avoid the problem.
<cfloop collection=error item="i">
<cfif i is not "generatedcontent">
#i#
<cfif isSimpleValue(error[i])>
#error[i]#<br>
<cfelse>
[:complex value:]<br>
</cfif>
</cfif>
</cfloop>
Spike
> -----Original Message-----
> From: Giles Roadnight [mailto:[EMAIL PROTECTED]]
> Sent: 10 October 2002 15:30
> To: [EMAIL PROTECTED]
> Subject: Re: [ cf-dev ] CFMX, looping through error varaibles
>
>
> oh yes, while I am here why do I sometimes get a nice looking
> formated grey box with an error message in it instead of my
> error template being loaded. In my application page I have
> request, validation and exception all pointing to my error
> template, am I missing any? I did have monitor too but MX
> told me that that is no longer supported.
>
> Giles
>
> ----- Original Message -----
> From: "Giles Roadnight" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, October 10, 2002 2:26 PM
> Subject: [ cf-dev ] CFMX, looping through error varaibles
>
>
> > Hi. I am writing an error template. I want to loop through
> all of the
> > availiable error variables, put them in a form, submit them
> to another
> page
> > then e-mail them to myself.
> >
> > I have this code:
> >
> > <cfloop collection=#error# item="i">
> > <cfif i is not "generatedcontent">
> > #i# #evaluate("error.#i#")#<br>
> > </cfif>
> > </cfloop
> >
> > but I get an error going on about complex and simple
> objects and how I
> can't
> > convert one to the other. this code works fine if I leve out the
> > evaluate bit and I get a list of the availiable variables.
> >
> > Is this somethig to do with MX handling evaluate
> differently or it it
> > because you can only have limited CF tags on the error template?
> >
> > Thanks
> >
> > Giles
> >
> >
> > --
> > ** Archive:
> http://www.mail-archive.com/dev%> 40lists.cfdeveloper.co.uk/
> >
>
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED] For
> > human help, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED] For human help, e-mail:
> [EMAIL PROTECTED]
>
>
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]