persistence@glassfish.java.net

Re: gf1166

From: Michael Bouschen <Michael.Bouschen_at_Sun.COM>
Date: Mon, 16 Oct 2006 14:17:54 +0200

Hi Shannon,

sorry for the late response, I was on vacation last week.

The changes look good, a few comments:
- You added a new exception parameter to EJBQLException methods such as
syntaxError and unexpectedToken. I propose to change the type of the
parameter from ANTLRException to Exception. This eliminates the compile
time dependency between EJBQLException and the antlr packages.
- Just a headsup: there have been some parallel changes of
EJBQLException in the glassfish repository, so you need to merge.

I think your proposed solution fixes issue 1136 and you should go ahead
and check in the fix. However, I think wrapping the ANTLRException is
only a temporary solution in order to get line and column information in
case of an error. This only works for syntactical errors thrown by the
antlr generated parser. There is no such ANTLRException to be wrapped
for errors thrown by other parts of the query compiler that are not
generated by antlr. The EJBQLException class itself should take line and
column information. I will file a separate enhancement issue for this.

Regards Michael
> Hi Michael,
>
> I fixed gf1166 by wrapping ANTLRExceptions in EJBQLExceptions. Please
> let me know if it's Ok with you.
>
> Thanks,
>
> Shannon