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

Reply via email to