You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Will Glass-Husain (JIRA)" <ji...@apache.org> on 2005/10/15 08:03:45 UTC

[jira] Resolved: (VELOCITY-373) Enhance ParseErrorException

     [ http://issues.apache.org/jira/browse/VELOCITY-373?page=all ]
     
Will Glass-Husain resolved VELOCITY-373:
----------------------------------------

    Resolution: Fixed

Patch applied.  Thanks Malcolm for pushing this along with a patch and a use case.

Three changes:

- made a test case
- changed a few other "new ParserErrorException ( pe.getMessage() ) to new ParserErrorException ( pe ) .  This makes this work with Velocity.evaluate()
- added a missing constructor to ParserException (still needed the three parameter constructor since I couldn't patch Parser.java)




> Enhance ParseErrorException
> ---------------------------
>
>          Key: VELOCITY-373
>          URL: http://issues.apache.org/jira/browse/VELOCITY-373
>      Project: Velocity
>         Type: Improvement
>   Components: Source
>     Versions: 1.5
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Malcolm Edgar
>     Priority: Minor
>      Fix For: 1.5
>  Attachments: ParseErrorException.txt, ParseErrorException.txt, ParseException.txt, Parser.jjt.txt, Parser.txt, Template.txt
>
> Enhance the ParseErrorException to report:
> * template name (path)
> * error line
> * error column
> The Click framework attempts to render the template error highlighting the
> offending line. However when templates or macros are included in a page, the 
> source of the error cannot be determined from the ParseErrorException message.
> If the additional properties could be added to the ParseErrorException
> the framework could accurately render the offending template error. This
> information should enable quicker debugging of usage errors by all Velocity users.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Re: [jira] Resolved: (VELOCITY-373) Enhance ParseErrorException

Posted by Malcolm Edgar <ma...@gmail.com>.
Hi Will,

thanks for getting this in. I want wait to pick it up :)

On a side issue I dont think I will mention FreeMaker again on the Velocity
dev list, this ends up generating a lot of noise.

regards Malcolm Edgar