Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30623/NHibernate Modified Files: ADOException.cs AssertionFailure.cs CallbackException.cs HibernateException.cs InstantiationException.cs LazyInitializationException.cs MappingException.cs ObjectDeletedException.cs ObjectNotFoundException.cs PersistentObjectException.cs PropertyAccessException.cs PropertyNotFoundException.cs QueryException.cs StaleObjectStateException.cs TransactionException.cs TransientObjectException.cs ValidationFailure.cs WrongClassException.cs Log Message: NH-99: Marked Exceptions as serializable. Index: ObjectDeletedException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ObjectDeletedException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ObjectDeletedException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- ObjectDeletedException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,19 **** using System; ! namespace NHibernate { ! /// <summary> /// Thrown when the user tries to pass a deleted object to the <c>ISession</c>. /// </summary> ! public class ObjectDeletedException : HibernateException { private object identifier; ! public ObjectDeletedException(string msg, object identifier) : base(msg) { this.identifier = identifier; } ! public object Identifier { get { return identifier; } } ! public override string Message { get { return base.Message + ": " + identifier; } } --- 1,26 ---- using System; ! namespace NHibernate ! { /// <summary> /// Thrown when the user tries to pass a deleted object to the <c>ISession</c>. /// </summary> ! [Serializable] ! public class ObjectDeletedException : HibernateException ! { private object identifier; ! public ObjectDeletedException(string msg, object identifier) : base(msg) ! { this.identifier = identifier; } ! ! public object Identifier ! { get { return identifier; } } ! ! public override string Message ! { get { return base.Message + ": " + identifier; } } Index: CallbackException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/CallbackException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CallbackException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- CallbackException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,8 **** using System; ! namespace NHibernate { ! ! public class CallbackException : HibernateException { ! public CallbackException(Exception root) : base("An exception occured in a callback", root) {} --- 1,9 ---- using System; ! namespace NHibernate ! { ! [Serializable] ! public class CallbackException : HibernateException ! { public CallbackException(Exception root) : base("An exception occured in a callback", root) {} Index: PropertyAccessException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/PropertyAccessException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PropertyAccessException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- PropertyAccessException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,14 **** using System; ! namespace NHibernate { /// <summary> /// A problem occurred accessing a property of an instance of a persistent class by reflection /// </summary> ! public class PropertyAccessException : HibernateException { private System.Type persistentType; private string propertyName; private bool wasSetter; ! public PropertyAccessException(Exception root, string s, bool wasSetter, System.Type persistentType, string propertyName) : base(s, root) { this.persistentType = persistentType; this.wasSetter = wasSetter; --- 1,18 ---- using System; ! namespace NHibernate ! { /// <summary> /// A problem occurred accessing a property of an instance of a persistent class by reflection /// </summary> ! [Serializable] ! public class PropertyAccessException : HibernateException ! { private System.Type persistentType; private string propertyName; private bool wasSetter; ! public PropertyAccessException(Exception root, string s, bool wasSetter, System.Type persistentType, string propertyName) : base(s, root) ! { this.persistentType = persistentType; this.wasSetter = wasSetter; *************** *** 16,25 **** } ! public System.Type PersistentType { get { return persistentType; } } ! public override string Message { ! get { return base.Message + ( wasSetter ? " setter of " : " getter of ") + --- 20,32 ---- } ! public System.Type PersistentType ! { get { return persistentType; } } ! public override string Message ! { ! get ! { return base.Message + ( wasSetter ? " setter of " : " getter of ") + Index: PersistentObjectException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/PersistentObjectException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PersistentObjectException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- PersistentObjectException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,11 **** using System; ! namespace NHibernate { ! /// <summary> /// Thrown when the user passes a persistent instance to a <c>ISession</c> method that expects a /// transient instance /// </summary> ! public class PersistentObjectException : HibernateException { public PersistentObjectException(string s) : base(s) {} } --- 1,13 ---- using System; ! namespace NHibernate ! { /// <summary> /// Thrown when the user passes a persistent instance to a <c>ISession</c> method that expects a /// transient instance /// </summary> ! [Serializable] ! public class PersistentObjectException : HibernateException ! { public PersistentObjectException(string s) : base(s) {} } Index: StaleObjectStateException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/StaleObjectStateException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StaleObjectStateException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- StaleObjectStateException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,5 **** using System; ! namespace NHibernate { /// <summary> /// Thrown when a version number check failed, indicating that the --- 1,6 ---- using System; ! namespace NHibernate ! { /// <summary> /// Thrown when a version number check failed, indicating that the *************** *** 7,30 **** /// versioning). /// </summary> ! public class StaleObjectStateException : HibernateException { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(StaleObjectStateException)); private System.Type persistentType; private object identifier; ! public StaleObjectStateException(System.Type persistentType, object identifier) : base("Row was updated or deleted by another transaction") { this.persistentType = persistentType; this.identifier = identifier; ! log.Error("An operation failed due to stale data", this); } ! public System.Type PersistentType { get { return persistentType; } } ! public object Identifier { get { return identifier; } } ! public override string Message { get { return base.Message + " for " + persistentType.FullName + " instance with identifier: " + identifier; } } --- 8,37 ---- /// versioning). /// </summary> ! [Serializable] ! public class StaleObjectStateException : HibernateException ! { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(StaleObjectStateException)); private System.Type persistentType; private object identifier; ! public StaleObjectStateException(System.Type persistentType, object identifier) : base("Row was updated or deleted by another transaction") ! { this.persistentType = persistentType; this.identifier = identifier; ! log4net.LogManager.GetLogger( typeof(StaleObjectStateException) ).Error("An operation failed due to stale data", this); } ! public System.Type PersistentType ! { get { return persistentType; } } ! public object Identifier ! { get { return identifier; } } ! public override string Message ! { get { return base.Message + " for " + persistentType.FullName + " instance with identifier: " + identifier; } } Index: ADOException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ADOException.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ADOException.cs 27 Mar 2003 01:14:25 -0000 1.3 --- ADOException.cs 13 Sep 2004 05:37:37 -0000 1.4 *************** *** 2,18 **** using System.Data; ! namespace NHibernate { /// <summary> /// Wraps an <c>DataException</c>. Indicates that an exception occurred during an ADO.NET call. /// </summary> ! public class ADOException : HibernateException { ! private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(ADOException)); private Exception sqle; public ADOException(DataException root) : this("DataException occurred", root) { } ! public ADOException(string str, Exception root) : base(str, root) { sqle = root; ! log.Error(str, root); } --- 2,21 ---- using System.Data; ! namespace NHibernate ! { /// <summary> /// Wraps an <c>DataException</c>. Indicates that an exception occurred during an ADO.NET call. /// </summary> ! [Serializable] ! public class ADOException : HibernateException ! { private Exception sqle; public ADOException(DataException root) : this("DataException occurred", root) { } ! public ADOException(string str, Exception root) : base(str, root) ! { sqle = root; ! log4net.LogManager.GetLogger( typeof(ADOException) ).Error(str, root); } Index: TransactionException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/TransactionException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TransactionException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- TransactionException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,10 **** using System; ! namespace NHibernate { /// <summary> /// Indicated that a transaction could not be begun, committed, or rolled back /// </summary> ! public class TransactionException : HibernateException { ! public TransactionException(string msg, Exception root) : base(msg, root) {} --- 1,12 ---- using System; ! namespace NHibernate ! { /// <summary> /// Indicated that a transaction could not be begun, committed, or rolled back /// </summary> ! [Serializable] ! public class TransactionException : HibernateException ! { public TransactionException(string msg, Exception root) : base(msg, root) {} Index: ObjectNotFoundException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ObjectNotFoundException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ObjectNotFoundException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- ObjectNotFoundException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,24 **** using System; ! namespace NHibernate { /// <summary> /// Thrown when the user tries to pass a deleted object to the <c>ISession</c>. /// </summary> ! public class ObjectNotFoundException : HibernateException { private object identifier; private System.Type type; ! public ObjectNotFoundException(string msg, object identifier, System.Type type) : base(msg) { this.identifier = identifier; this.type = type; } ! public object Identifier { get { return identifier; } } ! public override string Message { get { return base.Message + ": " + identifier + ", of class: " + type.FullName; } } ! public System.Type Type { get { return type; } } --- 1,34 ---- using System; ! namespace NHibernate ! { /// <summary> /// Thrown when the user tries to pass a deleted object to the <c>ISession</c>. /// </summary> ! [Serializable] ! public class ObjectNotFoundException : HibernateException ! { private object identifier; private System.Type type; ! public ObjectNotFoundException(string msg, object identifier, System.Type type) : base(msg) ! { this.identifier = identifier; this.type = type; } ! ! public object Identifier ! { get { return identifier; } } ! ! public override string Message ! { get { return base.Message + ": " + identifier + ", of class: " + type.FullName; } } ! ! public System.Type Type ! { get { return type; } } Index: MappingException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/MappingException.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MappingException.cs 2 Mar 2003 22:15:44 -0000 1.2 --- MappingException.cs 13 Sep 2004 05:37:37 -0000 1.3 *************** *** 1,11 **** using System; ! namespace NHibernate { /// <summary> /// An exception that usually occurs at configuration time, rather than runtime, as a result of /// something screwy in the O-R mappings /// </summary> ! public class MappingException : HibernateException { ! public MappingException(string msg, Exception root) : base(msg, root) {} --- 1,13 ---- using System; ! namespace NHibernate ! { /// <summary> /// An exception that usually occurs at configuration time, rather than runtime, as a result of /// something screwy in the O-R mappings /// </summary> ! [Serializable] ! public class MappingException : HibernateException ! { public MappingException(string msg, Exception root) : base(msg, root) {} Index: AssertionFailure.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/AssertionFailure.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AssertionFailure.cs 17 Feb 2003 18:16:13 -0000 1.1 --- AssertionFailure.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,18 **** using System; ! namespace NHibernate { ! /// <summary> /// Indicates failure of an assertion: a possible bug in NHibernate /// </summary> ! public class AssertionFailure : ApplicationException { ! private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(AssertionFailure)); ! ! public AssertionFailure(string s) : base(s) { ! log.Error("An AssertionFailure occured - this may indicate a bug in NHibernate", this); } ! public AssertionFailure(string s, Exception e) : base(s, e) { ! log.Error("An AssertionFailure occured - this may indicate a bug in NHibernate", e); } } --- 1,20 ---- using System; ! namespace NHibernate ! { /// <summary> /// Indicates failure of an assertion: a possible bug in NHibernate /// </summary> ! [Serializable] ! public class AssertionFailure : ApplicationException ! { ! public AssertionFailure(string s) : base(s) ! { ! log4net.LogManager.GetLogger( typeof(AssertionFailure) ).Error("An AssertionFailure occured - this may indicate a bug in NHibernate", this); } ! public AssertionFailure(string s, Exception e) : base(s, e) ! { ! log4net.LogManager.GetLogger( typeof(AssertionFailure) ).Error("An AssertionFailure occured - this may indicate a bug in NHibernate", e); } } Index: ValidationFailure.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ValidationFailure.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ValidationFailure.cs 17 Feb 2003 18:16:13 -0000 1.1 --- ValidationFailure.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,12 **** using System; ! namespace NHibernate { ! /// <summary> /// Thrown from <c>IValidatable.Validate()</c> when an invariant was violated. Some applications /// might subclass this exception in order to provide more information about the violation /// </summary> ! public class ValidationFailure : HibernateException { ! public ValidationFailure(string msg) : base(msg) {} --- 1,13 ---- using System; ! namespace NHibernate ! { /// <summary> /// Thrown from <c>IValidatable.Validate()</c> when an invariant was violated. Some applications /// might subclass this exception in order to provide more information about the violation /// </summary> ! [Serializable] ! public class ValidationFailure : HibernateException ! { public ValidationFailure(string msg) : base(msg) {} Index: HibernateException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/HibernateException.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HibernateException.cs 30 Apr 2004 14:06:45 -0000 1.3 --- HibernateException.cs 13 Sep 2004 05:37:37 -0000 1.4 *************** *** 1,5 **** using System; ! namespace NHibernate { /// <summary> --- 1,6 ---- using System; ! namespace NHibernate ! { /// <summary> *************** *** 7,12 **** /// </summary> /// <remarks>Exceptions that occur in the database layer are left as native exceptions</remarks> ! public class HibernateException : ApplicationException { ! public HibernateException(Exception e) : base(String.Empty, e) { } --- 8,14 ---- /// </summary> /// <remarks>Exceptions that occur in the database layer are left as native exceptions</remarks> ! [Serializable] ! public class HibernateException : ApplicationException ! { public HibernateException(Exception e) : base(String.Empty, e) { } Index: TransientObjectException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/TransientObjectException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TransientObjectException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- TransientObjectException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,11 **** using System; ! namespace NHibernate { ! /// <summary> /// Throw when the user passes a transient instance to a <c>ISession</c> method that expects /// a persistent instance /// </summary> ! public class TransientObjectException : HibernateException { public TransientObjectException(string msg): base(msg) { } } --- 1,13 ---- using System; ! namespace NHibernate ! { /// <summary> /// Throw when the user passes a transient instance to a <c>ISession</c> method that expects /// a persistent instance /// </summary> ! [Serializable] ! public class TransientObjectException : HibernateException ! { public TransientObjectException(string msg): base(msg) { } } Index: PropertyNotFoundException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/PropertyNotFoundException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PropertyNotFoundException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- PropertyNotFoundException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,10 **** using System; ! namespace NHibernate { ! /// <summary> /// Indicates that an expected getter or setter method could not be found on a class /// </summary> ! public class PropertyNotFoundException : MappingException { public PropertyNotFoundException(string msg, Exception root) : base(msg, root) {} public PropertyNotFoundException(Exception root) : base(root) {} --- 1,12 ---- using System; ! namespace NHibernate ! { /// <summary> /// Indicates that an expected getter or setter method could not be found on a class /// </summary> ! [Serializable] ! public class PropertyNotFoundException : MappingException ! { public PropertyNotFoundException(string msg, Exception root) : base(msg, root) {} public PropertyNotFoundException(Exception root) : base(root) {} Index: WrongClassException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/WrongClassException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WrongClassException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- WrongClassException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,27 **** using System; ! namespace NHibernate { /// <summary> /// Thrown when <c>ISession.Load()</c> selects a row with the given primary key (identifier value) /// but the row's discriminator value specifies a different subclass from the one requested /// </summary> ! public class WrongClassException : HibernateException { private object identifier; private System.Type type; ! public WrongClassException(string msg, object identifier, System.Type type) : base(msg) { this.identifier = identifier; this.type = type; } ! public object Identifier { get { return identifier; } } ! public System.Type Type { get { return type; } } ! public override string Message { get { return "Object with id: " + identifier --- 1,34 ---- using System; ! namespace NHibernate ! { /// <summary> /// Thrown when <c>ISession.Load()</c> selects a row with the given primary key (identifier value) /// but the row's discriminator value specifies a different subclass from the one requested /// </summary> ! [Serializable] ! public class WrongClassException : HibernateException ! { private object identifier; private System.Type type; ! public WrongClassException(string msg, object identifier, System.Type type) : base(msg) ! { this.identifier = identifier; this.type = type; } ! public object Identifier ! { get { return identifier; } } ! public System.Type Type ! { get { return type; } } ! public override string Message ! { get { return "Object with id: " + identifier Index: QueryException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/QueryException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** QueryException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- QueryException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,10 **** using System; ! namespace NHibernate { ! /// <summary> /// A problem occurred translating a Hibernate query to SQL due to invalid query syntax, etc. /// </summary> ! public class QueryException : HibernateException { private string queryString; --- 1,12 ---- using System; ! namespace NHibernate ! { /// <summary> /// A problem occurred translating a Hibernate query to SQL due to invalid query syntax, etc. /// </summary> ! [Serializable] ! public class QueryException : HibernateException ! { private string queryString; *************** *** 15,28 **** public QueryException(Exception e) : base(e) {} ! public string QueryString { get { return queryString; } set { queryString = value; } } ! public override string Message { get { return base.Message + " [" + queryString + "]"; } } - - } } --- 17,30 ---- public QueryException(Exception e) : base(e) {} ! public string QueryString ! { get { return queryString; } set { queryString = value; } } ! public override string Message ! { get { return base.Message + " [" + queryString + "]"; } } } } Index: LazyInitializationException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/LazyInitializationException.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LazyInitializationException.cs 18 Feb 2003 22:05:51 -0000 1.2 --- LazyInitializationException.cs 13 Sep 2004 05:37:37 -0000 1.3 *************** *** 1,16 **** using System; ! namespace NHibernate { /// <summary> /// A problem occurred trying to lazily initialize a collection or proxy (for example the session /// was closed) or iterate query results. /// </summary> ! public class LazyInitializationException : Exception { ! private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(LazyInitializationException)); ! public LazyInitializationException(Exception root) : base("Hibernate lazy instantiation problem", root) {} ! public LazyInitializationException(string msg) : base(msg) { ! log.Error(msg, this); } --- 1,18 ---- using System; ! namespace NHibernate ! { /// <summary> /// A problem occurred trying to lazily initialize a collection or proxy (for example the session /// was closed) or iterate query results. /// </summary> ! [Serializable] ! public class LazyInitializationException : Exception ! { public LazyInitializationException(Exception root) : base("Hibernate lazy instantiation problem", root) {} ! public LazyInitializationException(string msg) : base(msg) ! { ! log4net.LogManager.GetLogger( typeof(LazyInitializationException) ).Error(msg, this); } Index: InstantiationException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/InstantiationException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InstantiationException.cs 17 Feb 2003 18:16:13 -0000 1.1 --- InstantiationException.cs 13 Sep 2004 05:37:37 -0000 1.2 *************** *** 1,18 **** using System; ! namespace NHibernate { /// <summary> /// Thrown if Hibernate can't instantiate an entity or component class at runtime. /// </summary> ! public class InstantiationException : HibernateException { private System.Type type; ! public InstantiationException(string s, System.Type type, Exception root) : base(s, root) { this.type = type; } ! public System.Type PersistentType { get { return type; } } ! public override string Message { get { return base.Message + type.FullName; } } --- 1,26 ---- using System; ! namespace NHibernate ! { /// <summary> /// Thrown if Hibernate can't instantiate an entity or component class at runtime. /// </summary> ! [Serializable] ! public class InstantiationException : HibernateException ! { private System.Type type; ! public InstantiationException(string s, System.Type type, Exception root) : base(s, root) ! { this.type = type; } ! ! public System.Type PersistentType ! { get { return type; } } ! ! public override string Message ! { get { return base.Message + type.FullName; } } |