Error variable structure

In Coldfusion, I was using the error structure to get error informations,
like : #error.template# , #error.rootCause# , #error.diagnostics# , etc …

with Lucee 4.5 , these variables give an error

In what variable to get error informations ?

Thanks for help

Why not do something like:

 <cfdump var="#error#">

or

 dump(error)

and find out all of the information available in the error struct?

alternatively, StructKeyList(error) and StructKeyArray(error) should
give you the keys only.

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 11/27/2016 11:25 AM, Pierre Larde wrote:

In Coldfusion, I was using the error structure to get error informations,
like : #error.template# , #error.rootCause# , #error.diagnostics# ,
etc …

with Lucee 4.5 , these variables give an error

In what variable to get error informations ?

Thanks for help


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit
https://ti.to/cfcamp/cfcamp-2016/discount/Lucee@cfcamp

You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/061102ef-99fd-4f69-936f-9269fe70369c%40googlegroups.com
https://groups.google.com/d/msgid/lucee/061102ef-99fd-4f69-936f-9269fe70369c%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

I do not understand well,
Do you have a full code example ?

I use the old fashion application.cfm
But I think there is no difference.
What code line to put in the application.cfm

Today I have :

and in site_error.cfm
I was using the error structure variables. (via a mail to support)

Could you give me a full replacement of this code (from Coldfusion, working
fine)

Thanks a lot.
Pierre.Le dimanche 27 novembre 2016 20:25:25 UTC+1, Pierre Larde a écrit :

In Coldfusion, I was using the error structure to get error informations,
like : #error.template# , #error.rootCause# , #error.diagnostics# , etc

with Lucee 4.5 , these variables give an error

In what variable to get error informations ?

Thanks for help

OK, yes, it does all work again.
I am confused.

Thanks.Le dimanche 27 novembre 2016 20:25:25 UTC+1, Pierre Larde a écrit :

In Coldfusion, I was using the error structure to get error informations,
like : #error.template# , #error.rootCause# , #error.diagnostics# , etc

with Lucee 4.5 , these variables give an error

In what variable to get error informations ?

Thanks for help

I tried cfdump of error
And, message is : variable “error” doest not exists.

So, what is the way to get error informations ?

I used this Under coldfusion to get error information.
Thanks,
Pierre.Le dimanche 27 novembre 2016 20:25:25 UTC+1, Pierre Larde a écrit :

In Coldfusion, I was using the error structure to get error informations,
like : #error.template# , #error.rootCause# , #error.diagnostics# , etc

with Lucee 4.5 , these variables give an error

In what variable to get error informations ?

Thanks for help

I got the same problem, tried “”, got variable [ERROR] doesn’t exist. Any solution for this?

@Daniel_Huang Related issue from Jira LDEV-3739.
Use the cfcatch instead of the error variable. Hope it will solve your issue.

@cfmitrah Thanks for your quick response, it seems the structure of cfcatch has some difference to ACF’s error variable, can we get the info from cfcatch or other variable for below fields
RemoteAddress
RootCause
HTTPReferer
QueryString
Diagnostics
Template

Reference from ColdFusion
https://helpx.adobe.com/coldfusion/cfml-reference/reserved-words-and-variables/coldfusion-tag-specific-variables/cferror-variables.html

When cferror generates an error page, the following error variables are available if type=“request” or “exception”.

Error.Diagnostics
Error.MailTo
Error.DateTime
Error.Browser
Error.GeneratedContent
Error.RemoteAddress
Error.HTTPReferer
Error.Template
Error.QueryString

@cfmitrah Any advice on the above questions?

@Daniel_Huang Yes, cfcatch didn’t have those keys like the error variable. If you defined your custom error template in admin means use cferror tag in the application.cfc instead of that. Now you can use error variable with the above-mentioned keys in the error template.

<cferror type="request" template="/path-to-your/custom/errorTemplate.cfm"/>
<cferror type="exception" template="/path-to-your/custom/errorTemplate.cfm"/>