Issues
updating loadPageThrowTemplateException to include what page threw the error
Description
Attachments
1
Details
Assignee
UnassignedUnassignedReporter
Sean SSean SNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
New
Details
Details
Assignee
Unassigned
UnassignedReporter
Sean S
Sean SNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
Created 8 February 2017 at 19:25
Updated 18 June 2023 at 17:05
Activity
Show:
When Lucee parses a page and there is an error in how the page is written, such as with nesting of cfoutput blocks or having other attributes in the cfquery tag such as background="true" (which happen frequently in migration of sites from NewAtlanta BlueDragon) the exception and application error log dump out all the steps it took in attempting to run the page, but throws an error before logging what page caused the error. Making it impossible to look at the error logs and figure out what page was causing the error.
This is a section of of the log (from a nesting cfoutput error) that shows where it does the doInclude function, loads the page, and then throws the error.
at lucee.runtime.PageSourceImpl.loadPageThrowTemplateException(PageSourceImpl.java:181)
at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:884)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:880)
Compared with other errors such the query being written incorrectly which happens after the page is loaded, it shows the page and line number that the error occurred.
at lucee.runtime.tag.Query.doEndTag(Query.java:594)
at somedir.somefile$cf.call(/somedir/somefile.cfm:113)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:888)
My suggestion is to modify the loadPageThrowTemplateException java function (if that isn't the right place then loadPage) that does the page throw error when it couldn't run it correctly it include something in the output to designate what page was running that threw the error. Such as something like this
at lucee.runtime.PageSourceImpl.loadPageThrowTemplateException(PageSourceImpl.java:181, '/somedir/somefile.cfm')
or this
at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:884, '/somedir/somefile.cfm')
Or even if the line number if that is something that is easily gettable in the error throwing process. If not, at least the page was logged to know where to look.
at lucee.runtime.PageSourceImpl.loadPageThrowTemplateException(PageSourceImpl.java:181, '/somedir/somefile.cfm:113')
The end result, is that when errors like this occur, you can easily and quickly figure out which page needs to be written to run correctly in Lucee.
Attached is the full error output from an example of a nesting error which excludes anything about what page was running that caused it.