We should report it to Antlr.

Regarding exceptions it would be good if we started adding some more value to these exceptions - it would be so much better if I actually could get the line/column numbers as getters on the QuerySyntaxException.

The same goes with many of our other exceptions where I would need to parse (it at all possible) to report a sensible
error to the ant-task/plugin user.

Anyone who objects to me starting adding this to some of our exceptions (and possible create more specific exception subclasses) ?

Regarding culling of these exceptions isn't that something appserers actually can do in their serialization code ? (maybe keeping it Hibernate would be better to be more portable)

/max

This is nicer.
By design an exception is Serializable. It's a contract break from antlr. So the breaking exception list has to be manually maintained.

Steve Ebersole wrote:

A simpler solution would be to just add a writeObject() impl to
HibernateException which culls the cause if it is not serializable
(either to null or some "marker").

This would be all encompassing.  Plus it would still allow the cause to
be known (so long as no attempt is made to serialize it).


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Emmanuel Bernard
Sent: Thursday, September 08, 2005 9:05 AM
To: Hibernate development
Subject: [Hibernate] QuerySyntaxException not always serializable

To be more specific,
RecognitionException the cause exception may be not Serializable (eg antlr.NoViableAltException (AST and Token are not serializable)
Thus JBoss or any remote capable system clashes on remote calls.

Is it OK if we do not propagate the cause exception?
ie
public QuerySyntaxException(RecognitionException e) {
       super( e.getMessage() + (
               ( e.getLine() > 0 && e.getColumn() > 0 ) ?
( " near line " + e.getLine() + ", column " + e.getColumn() ) : ""
               ), *null* ); //instead of e
   }

Or do we consider Hibernate exceptions as not Serializable?



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel






-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel



--
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://www.jboss.com/events/jbossworld
JBoss World Barcelona 10-12 October


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to