You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by ge...@apache.org on 2001/07/14 15:22:41 UTC
cvs commit: jakarta-velocity/src/java/org/apache/velocity/runtime/parser Parser.jjt
geirm 01/07/14 06:22:40
Modified: src/java/org/apache/velocity/runtime/parser Parser.jjt
Log:
Converted TokenManagerError to ParserException, suggested by Tim Joyce
<ti...@hoop.co.uk> prompted by bug report from Will Glass-Husain
<wg...@forio.com>. Thanks y'all.
The only effect is that anything the parser would throw a token error over
is now simply seen at the app level as a Velocity ParseErrorException.
Revision Changes Path
1.63 +5 -1 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/Parser.jjt
Index: Parser.jjt
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/Parser.jjt,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- Parser.jjt 2001/06/29 23:31:37 1.62
+++ Parser.jjt 2001/07/14 13:22:40 1.63
@@ -136,7 +136,7 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: Parser.jjt,v 1.62 2001/06/29 23:31:37 geirm Exp $
+ * @version $Id: Parser.jjt,v 1.63 2001/07/14 13:22:40 geirm Exp $
*/
public class Parser
{
@@ -216,6 +216,10 @@
Runtime.error ("Parser Exception: " + templateName + " : " + StringUtils.stackTrace(pe));
throw new ParseException (pe.currentToken,
pe.expectedTokenSequences, pe.tokenImage);
+ }
+ catch (TokenMgrError tme)
+ {
+ throw new ParseException("Lexical error: " + tme.toString());
}
catch (Exception e)
{