You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Michael Giroux <ml...@gmail.com> on 2007/03/09 17:12:17 UTC

Velocity 1.5 truncates name of template in error message

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: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: Velocity 1.5 truncates name of template in error message

Posted by Michael Giroux <ml...@gmail.com>.
My code was catching the original ParseErrorException and rethrowing a
simple Exception.  I've fixed that.  I've posted more to the JIRA.

On 3/9/07, Claude Brisson <cl...@renegat.net> wrote:
> Le vendredi 09 mars 2007 à 09:12 -0700, Michael Giroux a écrit :
> > 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: ...
>
> It seemed to me that Velocity 1.5 introduced a
> org.apache.velocity.exception.ParseErrorException instead of the generic
> java.lang.Exception. Maybe some where forgotten. What is the full
> stacktrace ?
>
> Withe the ParseErrorException, I did not have this truncation problem,
> even with quite long template names.
>
>  Claude
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: Velocity 1.5 truncates name of template in error message

Posted by Claude Brisson <cl...@renegat.net>.
Le vendredi 09 mars 2007 à 09:12 -0700, Michael Giroux a écrit :
> 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: ...

It seemed to me that Velocity 1.5 introduced a
org.apache.velocity.exception.ParseErrorException instead of the generic
java.lang.Exception. Maybe some where forgotten. What is the full
stacktrace ?

Withe the ParseErrorException, I did not have this truncation problem,
even with quite long template names.

  Claude




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: Velocity 1.5 truncates name of template in error message

Posted by Will Glass-Husain <wg...@gmail.com>.
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

The plan is to turn around a new update a little faster this time,
either a 1.5.1 release (with any bug fixes) or a 1.6 release (with
incremental new features).  If you post this note in JIRA we'll be
able to quickly address it and you can track the status of the fix.

Thanks, WILL

On 3/9/07, Michael Giroux <ml...@gmail.com> 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: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org