[
https://issues.apache.org/jira/browse/VELOCITY-644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Byron Foster updated VELOCITY-644:
----------------------------------
Attachment: fix644.patch
Attached is a fix for this bug along with a test case. This fix looks bigger
then it really is. I added a template member to the SimpleNode class along
with a get property to compliment getLine an getColumn. This member is
initialized in the SimpleNode Constructor and set from the Parser. I think it
is more reliable to associate the template name to the node, as is currently
done with the line number and column, then it is to get it from the context.
Before this fix the context template was used to indicate the template file the
error occurred in, but this really is not the intended use of this file name,
but rather Its purpose is to track scope.
> Wrong template name in Exception Message
> ----------------------------------------
>
> Key: VELOCITY-644
> URL: https://issues.apache.org/jira/browse/VELOCITY-644
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6-beta1
> Reporter: Byron Foster
> Attachments: fix644.patch
>
>
> If a reference within a macro causes an Exception, and the macro is defined
> in a different file, then the Exception message thrown by Velocity reports
> the name of the calling template file, and not the file that defines the
> macro. However, the column number and line number are correct for the macro
> file.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]