[ 
https://issues.apache.org/jira/browse/VELOCITY-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479711
 ] 

Michael Giroux commented on VELOCITY-527:
-----------------------------------------

When you fix this, would you please add the current physical file location to 
the error message?
I'm using velocity 1.5 and getting error messages that give line numbers that 
are incorrect.  For example, I'm getting an error that I have a #foreach at 
line 40 and something else is expected.  Unfortunately, I do not have one vm 
file with a #foreach at line 40, so the line number is wrong.  if I had the 
file offset, I could at least use a hex editor or other tool to position to 
that location to figure out wher ethe error really is.

In my specific case, the column numbe reported is 30, and as far as I can tell, 
the #foreach with the greatest indentation is at column 16, so it seems the 
error message column # is being influenced by whitespace processing as well.



> Name of template truncated in error messages
> --------------------------------------------
>
>                 Key: VELOCITY-527
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-527
>             Project: Velocity
>          Issue Type: Bug
>    Affects Versions: 1.5
>         Environment: Windows XP Pro SP2, JDK 1.5
>            Reporter: Michael Giroux
>
> Following was posted to mailing list:
> On 3/9/07, Will Glass-Husain <[EMAIL PROTECTED]> wrote:
> > Ouch.  Always hate that first bug report after a new release!
> > 
> > Would you mind please creating a JIRA issue at:
> > http://issues.apache.org/jira
> > 
> > On 3/9/07, Michael Giroux <[EMAIL PROTECTED]> wrote:
> > > I just upgraded to Velocity 1.5.  A key feature for me is the new
> > > functionality to include filename, line and column in error messages.
> > > When I was testing this feature with a faulty template, I discovered
> > > that the filename is being truncated. In the error message below, the
> > > actual file name should be "business-service-interface.vm"  It appears
> > > the parser truncated at the first "-".
> > >
> > >
> > > java.lang.Exception: Encountered "#else" at line 51, column 33 of business
> > > Was expecting one of: ...
> > >
> > >
> > > Michael:
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > 
> > 
> > --
> > Forio Business Simulations
> > 
> > Will Glass-Husain
> > [EMAIL PROTECTED]
> > www.forio.com
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 

-- 
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]

Reply via email to