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
  <[EMAIL PROTECTED]> prompted by bug report from Will Glass-Husain
  <[EMAIL PROTECTED]>.  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:[EMAIL PROTECTED]";>Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>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)
           {
  
  
  

Reply via email to