velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Joyce" <...@hoop.co.uk>
Subject Re: reporting bugs
Date Sat, 14 Jul 2001 07:00:21 GMT
Will,

> I put a badly formatted statement in my template file.  (I mistakenly
typed
> in an HTML editor instead of a text editor, resulting in a quote being
> entered as '&quot;' instead of '"'.  Instead of throwing a
> ParseErrorException, my HTML output said "Internal Servlet Error" and
> printed a stacktrace.  Oddly, my servlet encloses the call to
"getTemplate"
> in a try/catch statement, so an exception should have been caught.

it's an error, not an exception :(

> Fixing
> the bad statement in the template file caused the error to go away.
>
> The incorrect statement was:
> #set ($a = &quot;Price&quot;)

bizarely I reported this to webmacro a couple of days ago.  I IMHO javacc
has a bug where it throws Errors and not Exceptions when it hits token
problems.

  public class TokenMgrError extends Error


Anyway brian fixed this by catching and wraping:

      catch (TokenMgrError e) {
        throw new ParseException("Lexical error: " + e.toString());
      }

I know this doesn't help you, but as it's occured twice, perhaps someone
should raise this with the Javacc people.

cheers

timj



Mime
View raw message