Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11213/NHibernate Modified Files: 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: Followed FxCops rules on creating custom exceptions and supporting serialization. However, they still inherit from ApplicationException. Index: ObjectDeletedException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ObjectDeletedException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ObjectDeletedException.cs 1 Jan 2005 03:34:16 -0000 1.5 --- ObjectDeletedException.cs 14 Feb 2005 03:17:06 -0000 1.6 *************** *** 8,75 **** /// </summary> [Serializable] ! public class ObjectDeletedException : HibernateException { private object identifier; /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="identifier"></param> ! public ObjectDeletedException( string message, object identifier ) : base( message ) { - this.identifier = identifier; } ! /// <summary></summary> ! public object Identifier { - get { return identifier; } } ! /// <summary></summary> ! public override string Message { ! get { return base.Message + ": " + identifier; } } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public ObjectDeletedException( string message, Exception root ) : this( message, root.Message ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! public ObjectDeletedException( string message ) : this( message, message ) { } /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! public ObjectDeletedException( Exception root ) : this( root.Message, root.Message ) { } ! /// <summary></summary> ! public ObjectDeletedException() : this( string.Empty, string.Empty ) ! { ! } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected ObjectDeletedException( SerializationInfo info, StreamingContext context ) : base( info, context ) { } } } \ No newline at end of file --- 8,110 ---- /// </summary> [Serializable] ! public class ObjectDeletedException : HibernateException, ISerializable { private object identifier; /// <summary> ! /// Initializes a new instance of the <see cref="ObjectDeletedException"/> class. /// </summary> ! public ObjectDeletedException() : this( "User tried to pass a deleted object to the ISession." ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ObjectDeletedException"/> class. ! /// </summary> ! /// <param name="message"></param> ! public ObjectDeletedException( string message ) : this( message, "n/a" ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ObjectDeletedException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="identifier">The identifier of the object that was attempting to be deleted.</param> ! public ObjectDeletedException( string message, object identifier ) : base( message ) { ! this.identifier = identifier; } /// <summary> ! /// Initializes a new instance of the <see cref="ObjectDeletedException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public ObjectDeletedException( string message, Exception innerException ) : base( message, innerException ) { } /// <summary> ! /// Gets the identifier of the object that was attempting to be deleted. /// </summary> ! public object Identifier { + get { return identifier; } } /// <summary> ! /// Gets a message that describes the current <see cref="WrongClassException"/>. /// </summary> ! /// <value> ! /// The error message that explains the reason for this exception and the identifier ! /// of the object. ! /// </value> ! public override string Message { + get { return base.Message + ": " + identifier; } } ! #region ISerializable Members /// <summary> ! /// Initializes a new instance of the <see cref="ObjectDeletedException"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected ObjectDeletedException( SerializationInfo info, StreamingContext context ) : base( info, context ) { + identifier = info.GetValue( "identifer", typeof(object) ); } + + + /// <summary> + /// Sets the serialization info for <see cref="ObjectDeletedException"/> after + /// getting the info from the base Exception. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData( info, context ); + info.AddValue( "identifier", identifier ); + } + + #endregion } } \ No newline at end of file Index: CallbackException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/CallbackException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CallbackException.cs 1 Jan 2005 03:31:31 -0000 1.5 --- CallbackException.cs 14 Feb 2005 03:17:05 -0000 1.6 *************** *** 8,12 **** public class CallbackException : HibernateException { ! /// <summary></summary> public CallbackException() : this( "An exception occured in a callback" ) { --- 8,14 ---- public class CallbackException : HibernateException { ! /// <summary> ! /// Initializes a new instance of the <see cref="CallbackException"/> class. ! /// </summary> public CallbackException() : this( "An exception occured in a callback" ) { *************** *** 14,28 **** /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! public CallbackException( Exception root ) : this( "An exception occured in a callback", root ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public CallbackException( string message ) : base( message ) { --- 16,34 ---- /// <summary> ! /// Initializes a new instance of the <see cref="CallbackException"/> class. /// </summary> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public CallbackException( Exception innerException ) : base( "An exception occured in a callback", innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="CallbackException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> public CallbackException( string message ) : base( message ) { *************** *** 30,46 **** /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="e"></param> ! public CallbackException( string message, Exception e ) : base( message, e ) { } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected CallbackException( SerializationInfo info, StreamingContext context ) : base( info, context ) { --- 36,62 ---- /// <summary> ! /// Initializes a new instance of the <see cref="CallbackException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public CallbackException( string message, Exception innerException ) : base( message, innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="CallbackException"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected CallbackException( SerializationInfo info, StreamingContext context ) : base( info, context ) { Index: PropertyAccessException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/PropertyAccessException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PropertyAccessException.cs 1 Jan 2005 03:34:16 -0000 1.4 --- PropertyAccessException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 7,11 **** /// </summary> [Serializable] ! public class PropertyAccessException : HibernateException { private System.Type persistentType; --- 8,12 ---- /// </summary> [Serializable] ! public class PropertyAccessException : HibernateException, ISerializable { private System.Type persistentType; *************** *** 14,25 **** /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! /// <param name="message"></param> ! /// <param name="wasSetter"></param> ! /// <param name="persistentType"></param> ! /// <param name="propertyName"></param> ! public PropertyAccessException( Exception root, string message, bool wasSetter, System.Type persistentType, string propertyName ) : base( message, root ) { this.persistentType = persistentType; --- 15,60 ---- /// <summary> ! /// Initializes a new instance of the <see cref="PropertyAccessException"/> class. /// </summary> ! public PropertyAccessException( ) : base( "A problem occurred accessing a mapped property of an instance of a persistent class by reflection." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="PropertyAccessException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public PropertyAccessException( string message ) : base( message ) ! { ! ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="PropertyAccessException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public PropertyAccessException( string message, Exception innerException ) : base( message, innerException ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="PropertyAccessException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! /// <param name="wasSetter">A <see cref="Boolean"/> indicating if this was a "setter" operation.</param> ! /// <param name="persistentType">The <see cref="System.Type"/> that NHibernate was trying find the Property or Field in.</param> ! /// <param name="propertyName">The mapped property name that was trying to be accessed.</param> ! public PropertyAccessException( Exception innerException, string message, bool wasSetter, System.Type persistentType, string propertyName ) ! : base( message, innerException ) { this.persistentType = persistentType; *************** *** 28,32 **** } ! /// <summary></summary> public System.Type PersistentType { --- 63,69 ---- } ! /// <summary> ! /// Gets the <see cref="System.Type"/> that NHibernate was trying find the Property or Field in. ! /// </summary> public System.Type PersistentType { *************** *** 34,38 **** } ! /// <summary></summary> public override string Message { --- 71,81 ---- } ! /// <summary> ! /// Gets a message that describes the current <see cref="PropertyAccessException"/>. ! /// </summary> ! /// <value> ! /// The error message that explains the reason for this exception and ! /// information about the mapped property and its usage. ! /// </value> public override string Message { *************** *** 46,49 **** --- 89,133 ---- } } + + #region ISerializable Members + + /// <summary> + /// Initializes a new instance of the <see cref="PropertyAccessException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected PropertyAccessException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + persistentType = (System.Type)info.GetValue( "persistentType", typeof(System.Type) ); + propertyName = info.GetString( "propertyName" ); + wasSetter = info.GetBoolean( "wasSetter" ); + } + + /// <summary> + /// Sets the serialization info for <see cref="PropertyAccessException"/> after + /// getting the info from the base Exception. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData( info, context ); + info.AddValue( "persistentType", persistentType, typeof(System.Type) ); + info.AddValue( "propertyName", propertyName ); + info.AddValue( "wasSetter", wasSetter ); + } + + #endregion } } \ No newline at end of file Index: PersistentObjectException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/PersistentObjectException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PersistentObjectException.cs 1 Jan 2005 03:34:16 -0000 1.4 --- PersistentObjectException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 11,20 **** { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public PersistentObjectException( string message ) : base( message ) { } } } \ No newline at end of file --- 12,58 ---- { /// <summary> ! /// Initializes a new instance of the <see cref="PersistentObjectException"/> class. /// </summary> ! public PersistentObjectException() : this( "User passed a persistent instance to an ISession method that expected a transient instance." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="PersistentObjectException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> public PersistentObjectException( string message ) : base( message ) { } + + /// <summary> + /// Initializes a new instance of the <see cref="PersistentObjectException"/> class. + /// </summary> + /// <param name="message">The message that describes the error. </param> + /// <param name="innerException"> + /// The exception that is the cause of the current exception. If the innerException parameter + /// is not a null reference, the current exception is raised in a catch block that handles + /// the inner exception. + /// </param> + public PersistentObjectException( string message, Exception innerException ) : base( message, innerException ) + { + } + + /// <summary> + /// Initializes a new instance of the <see cref="PersistentObjectException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected PersistentObjectException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + } + + } } \ No newline at end of file Index: StaleObjectStateException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/StaleObjectStateException.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StaleObjectStateException.cs 1 Jan 2005 03:35:39 -0000 1.3 --- StaleObjectStateException.cs 14 Feb 2005 03:17:06 -0000 1.4 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; using log4net; *************** *** 10,25 **** /// </summary> [Serializable] ! public class StaleObjectStateException : HibernateException { - private static readonly ILog log = LogManager.GetLogger( typeof( StaleObjectStateException ) ); private System.Type persistentType; private object identifier; /// <summary> ! /// /// </summary> ! /// <param name="persistentType"></param> ! /// <param name="identifier"></param> ! public StaleObjectStateException( System.Type persistentType, object identifier ) : base( "Row was updated or deleted by another transaction" ) { this.persistentType = persistentType; --- 11,54 ---- /// </summary> [Serializable] ! public class StaleObjectStateException : HibernateException, ISerializable { private System.Type persistentType; private object identifier; /// <summary> ! /// Initializes a new instance of the <see cref="StaleObjectStateException"/> class. /// </summary> ! public StaleObjectStateException() : base( "A version number check failed. The ISession contained stale data." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="StaleObjectStateException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public StaleObjectStateException( string message ) : base( message ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="StaleObjectStateException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public StaleObjectStateException( string message, Exception innerException ) : base( message, innerException ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="StaleObjectStateException"/> class. ! /// </summary> ! /// <param name="persistentType">The <see cref="System.Type"/> that NHibernate was trying to update in the database.</param> ! /// <param name="identifier">The identifier of the object that is stale.</param> ! public StaleObjectStateException( System.Type persistentType, object identifier ) ! : base( "Row was updated or deleted by another transaction" ) { this.persistentType = persistentType; *************** *** 28,32 **** } ! /// <summary></summary> public System.Type PersistentType { --- 57,63 ---- } ! /// <summary> ! /// Gets the <see cref="System.Type"/> that NHibernate was trying to update in the database. ! /// </summary> public System.Type PersistentType { *************** *** 34,38 **** } ! /// <summary></summary> public object Identifier { --- 65,71 ---- } ! /// <summary> ! /// Gets the identifier of the object that is stale. ! /// </summary> public object Identifier { *************** *** 40,48 **** } ! /// <summary></summary> public override string Message { get { return base.Message + " for " + persistentType.FullName + " instance with identifier: " + identifier; } } } } \ No newline at end of file --- 73,123 ---- } ! /// <summary> ! /// Gets a message that describes the current <see cref="StaleObjectStateException"/>. ! /// </summary> ! /// <value>The error message that explains the reason for this exception.</value> public override string Message { get { return base.Message + " for " + persistentType.FullName + " instance with identifier: " + identifier; } } + + #region ISerializable Members + + /// <summary> + /// Initializes a new instance of the <see cref="StaleObjectStateException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected StaleObjectStateException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + persistentType = (System.Type)info.GetValue( "persistentType", typeof(System.Type) ); + identifier = info.GetValue( "identifier", typeof(object) ); + } + + /// <summary> + /// Sets the serialization info for <see cref="StaleObjectStateException"/> after + /// getting the info from the base Exception. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData( info, context ); + info.AddValue( "persistentType", persistentType, typeof(System.Type) ); + info.AddValue( "identifier", identifier, typeof(object) ); + } + + #endregion } } \ No newline at end of file Index: TransactionException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/TransactionException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TransactionException.cs 1 Jan 2005 03:35:39 -0000 1.4 --- TransactionException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 9,28 **** public class TransactionException : HibernateException { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public TransactionException( string message, Exception root ) : base( message, root ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public TransactionException( string message ) : base( message ) { } } } \ No newline at end of file --- 10,56 ---- public class TransactionException : HibernateException { + /// <summary> ! /// Initializes a new instance of the <see cref="TransactionException"/> class. /// </summary> ! public TransactionException() : base( "A Transaction could not be begun, committed, or rolled back.") { } /// <summary> ! /// Initializes a new instance of the <see cref="TransactionException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> public TransactionException( string message ) : base( message ) { } + + /// <summary> + /// Initializes a new instance of the <see cref="TransactionException"/> class. + /// </summary> + /// <param name="message">The message that describes the error. </param> + /// <param name="innerException"> + /// The exception that is the cause of the current exception. If the innerException parameter + /// is not a null reference, the current exception is raised in a catch block that handles + /// the inner exception. + /// </param> + public TransactionException( string message, Exception innerException ) : base( message, innerException ) + { + } + + /// <summary> + /// Initializes a new instance of the <see cref="TransactionException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected TransactionException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + } } } \ No newline at end of file Index: ObjectNotFoundException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ObjectNotFoundException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ObjectNotFoundException.cs 1 Jan 2005 03:34:16 -0000 1.5 --- ObjectNotFoundException.cs 14 Feb 2005 03:17:06 -0000 1.6 *************** *** 5,12 **** { /// <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; --- 5,17 ---- { /// <summary> ! /// Thrown when <c>ISession.Load()</c> fails to select a row with ! /// the given primary key (identifier value). This exception might not ! /// be thrown when <c>Load()</c> is called, even if there was no ! /// row on the database, because <c>Load()</c> returns a proxy if ! /// possible. Applications should use <c>ISession.Get()</c> to test if ! /// a row exists in the database. /// </summary> [Serializable] ! public class ObjectNotFoundException : HibernateException, ISerializable { private object identifier; *************** *** 14,79 **** /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="identifier"></param> ! /// <param name="type"></param> ! public ObjectNotFoundException( string message, object identifier, System.Type type ) : base( message ) { - this.identifier = identifier; - this.type = type; } ! /// <summary></summary> ! public object Identifier { - get { return identifier; } } ! /// <summary></summary> ! public override string Message { - get { return base.Message + ": " + identifier + ", of class: " + type.FullName; } } ! /// <summary></summary> ! public System.Type Type { ! get { return type; } } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public ObjectNotFoundException( string message, Exception root ) : this( message, root.Message, typeof( ObjectNotFoundException ) ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! public ObjectNotFoundException( string message ) : this( message, message, typeof( ObjectNotFoundException ) ) { } /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! public ObjectNotFoundException( Exception root ) : this( root.Message, root.Message, typeof( ObjectNotFoundException ) ) { } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected ObjectNotFoundException( SerializationInfo info, StreamingContext context ) : base( info, context ) { } } } \ No newline at end of file --- 19,127 ---- /// <summary> ! /// Initializes a new instance of the <see cref="ObjectNotFoundException"/> class. /// </summary> ! public ObjectNotFoundException( ) : base( "No object could be found with the supplied identifier." ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ObjectNotFoundException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public ObjectNotFoundException( string message ) : base( message ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ObjectNotFoundException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public ObjectNotFoundException( string message, Exception innerException ) : base( message, innerException ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ObjectNotFoundException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="identifier">The identifier of the object that was attempting to be loaded.</param> ! /// <param name="type">The <see cref="System.Type"/> that NHibernate was trying to find a row for in the database.</param> ! public ObjectNotFoundException( string message, object identifier, System.Type type ) : base( message ) { ! this.identifier = identifier; ! this.type = type; } /// <summary> ! /// Gets the identifier of the object that was attempting to be loaded. /// </summary> ! public object Identifier { + get { return identifier; } } /// <summary> ! /// Gets a message that describes the current <see cref="ObjectNotFoundException"/>. /// </summary> ! /// <value> ! /// The error message that explains the reason for this exception and details of ! /// the object that was attempting to be loaded. ! /// </value> ! public override string Message { + get { return base.Message + ": " + identifier + ", of class: " + type.FullName; } } /// <summary> ! /// Gets the <see cref="System.Type"/> that NHibernate was trying to find a row for in the database. /// </summary> ! public System.Type Type { + get { return type; } } + #region ISerializable Members + /// <summary> ! /// Initializes a new instance of the <see cref="ObjectNotFoundException"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected ObjectNotFoundException( SerializationInfo info, StreamingContext context ) : base( info, context ) { + type = (System.Type)info.GetValue( "type", typeof(System.Type) ); + identifier = info.GetValue( "identifier", typeof(object) ) ; } + + /// <summary> + /// Sets the serialization info for <see cref="ObjectNotFoundException"/> after + /// getting the info from the base Exception. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData( info, context ); + info.AddValue( "type", type, typeof(System.Type) ); + info.AddValue( "identifier", identifier, typeof(object) ); + } + + #endregion } } \ No newline at end of file Index: MappingException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/MappingException.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MappingException.cs 1 Jan 2005 03:34:01 -0000 1.6 --- MappingException.cs 14 Feb 2005 03:17:06 -0000 1.7 *************** *** 12,49 **** { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public MappingException( string message, Exception root ) : base( message, root ) { } /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! public MappingException( Exception root ) : base( root ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! public MappingException( string message ) : base( message ) { } ! /// <summary></summary> ! public MappingException() : base() { } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected MappingException( SerializationInfo info, StreamingContext context ) : base( info, context ) { --- 12,65 ---- { /// <summary> ! /// Initializes a new instance of the <see cref="MappingException"/> class. /// </summary> ! public MappingException() : base() { } /// <summary> ! /// Initializes a new instance of the <see cref="MappingException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public MappingException( string message ) : base( message ) { } /// <summary> ! /// Initializes a new instance of the <see cref="MappingException"/> class. /// </summary> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public MappingException( Exception innerException ) : base( innerException ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="MappingException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public MappingException( string message, Exception innerException ) : base( message, innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="MappingException"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected MappingException( SerializationInfo info, StreamingContext context ) : base( info, context ) { Index: ValidationFailure.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ValidationFailure.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ValidationFailure.cs 1 Jan 2005 03:35:39 -0000 1.4 --- ValidationFailure.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 12,49 **** { /// <summary> ! /// /// </summary> ! /// <param name="msg"></param> ! public ValidationFailure( string msg ) : base( msg ) { } /// <summary> ! /// /// </summary> ! /// <param name="msg"></param> ! /// <param name="e"></param> ! public ValidationFailure( string msg, Exception e ) : base( msg, e ) { } /// <summary> ! /// /// </summary> ! /// <param name="e"></param> ! public ValidationFailure( Exception e ) : base( "A validation failure occured", e ) { } ! /// <summary></summary> ! public ValidationFailure() : base( "A validation failure occured" ) { } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected ValidationFailure( SerializationInfo info, StreamingContext context ) : base( info, context ) { --- 12,65 ---- { /// <summary> ! /// Initializes a new instance of the <see cref="ValidationFailure"/> class. /// </summary> ! public ValidationFailure() : base( "A validation failure occured" ) { } /// <summary> ! /// Initializes a new instance of the <see cref="ValidationFailure"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public ValidationFailure( string message ) : base( message ) { } /// <summary> ! /// Initializes a new instance of the <see cref="ValidationFailure"/> class. /// </summary> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public ValidationFailure( Exception innerException ) : base( "A validation failure occured", innerException ) { } ! /// <summary> ! /// Initializes a new instance of the <see cref="ValidationFailure"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public ValidationFailure( string message, Exception innerException ) : base( message, innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="ValidationFailure"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected ValidationFailure( SerializationInfo info, StreamingContext context ) : base( info, context ) { Index: HibernateException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/HibernateException.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** HibernateException.cs 31 Dec 2004 15:24:05 -0000 1.8 --- HibernateException.cs 14 Feb 2005 03:17:05 -0000 1.9 *************** *** 7,51 **** /// Any exception that occurs in the O-R persistence layer. /// </summary> ! /// <remarks>Exceptions that occur in the database layer are left as native exceptions</remarks> [Serializable] public class HibernateException : ApplicationException { /// <summary> ! /// /// </summary> ! public HibernateException() : base( String.Empty ) { } /// <summary> ! /// /// </summary> ! /// <param name="e"></param> ! public HibernateException( Exception e ) : base( e.Message, e ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="e"></param> ! public HibernateException( string message, Exception e ) : base( message, e ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! public HibernateException( string message ) : base( message ) { } /// <summary> ! /// /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> protected HibernateException( SerializationInfo info, StreamingContext context ) : base( info, context ) { --- 7,67 ---- /// Any exception that occurs in the O-R persistence layer. /// </summary> ! /// <remarks> ! /// Exceptions that occur in the database layer are left as native exceptions. ! /// </remarks> [Serializable] public class HibernateException : ApplicationException { /// <summary> ! /// Initializes a new instance of the <see cref="HibernateException"/> class. /// </summary> ! public HibernateException() : base( "An exception occurred in the persistence layer." ) { } /// <summary> ! /// Initializes a new instance of the <see cref="HibernateException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public HibernateException( string message ) : base( message ) { } /// <summary> ! /// Initializes a new instance of the <see cref="HibernateException"/> class. /// </summary> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public HibernateException( Exception innerException ) : base( innerException.Message, innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="HibernateException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public HibernateException( string message, Exception innerException ) : base( message, innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="HibernateException"/> class ! /// with serialized data. /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> protected HibernateException( SerializationInfo info, StreamingContext context ) : base( info, context ) { Index: TransientObjectException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/TransientObjectException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TransientObjectException.cs 1 Jan 2005 03:35:39 -0000 1.4 --- TransientObjectException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 11,20 **** { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public TransientObjectException( string message ) : base( message ) { } } } \ No newline at end of file --- 12,57 ---- { /// <summary> ! /// Initializes a new instance of the <see cref="TransientObjectException"/> class. /// </summary> ! public TransientObjectException() ! : base( "The user passed a transient instance to an ISession method that expects a persistent instance." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="TransientObjectException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> public TransientObjectException( string message ) : base( message ) { } + + /// <summary> + /// Initializes a new instance of the <see cref="TransientObjectException"/> class. + /// </summary> + /// <param name="message">The message that describes the error. </param> + /// <param name="innerException"> + /// The exception that is the cause of the current exception. If the innerException parameter + /// is not a null reference, the current exception is raised in a catch block that handles + /// the inner exception. + /// </param> + public TransientObjectException( string message, Exception innerException ) : base( message, innerException ) + { + } + + /// <summary> + /// Initializes a new instance of the <see cref="TransientObjectException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected TransientObjectException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + } } } \ No newline at end of file Index: PropertyNotFoundException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/PropertyNotFoundException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PropertyNotFoundException.cs 1 Jan 2005 03:34:16 -0000 1.4 --- PropertyNotFoundException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 9,36 **** public class PropertyNotFoundException : MappingException { /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="root"></param> ! public PropertyNotFoundException( string message, Exception root ) : base( message, root ) { } /// <summary> ! /// /// </summary> ! /// <param name="root"></param> ! public PropertyNotFoundException( Exception root ) : base( root ) { } /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! public PropertyNotFoundException( string message ) : base( message ) { } } } \ No newline at end of file --- 10,57 ---- public class PropertyNotFoundException : MappingException { + /// <summary> ! /// Initializes a new instance of the <see cref="PropertyNotFoundException"/> class. /// </summary> ! public PropertyNotFoundException() : base( "An expected getter, setter, or field could not be found." ) { } /// <summary> ! /// Initializes a new instance of the <see cref="PropertyNotFoundException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public PropertyNotFoundException( string message ) : base( message ) { } /// <summary> ! /// Initializes a new instance of the <see cref="PropertyNotFoundException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public PropertyNotFoundException( string message, Exception innerException ) : base( message, innerException ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="PropertyNotFoundException"/> class ! /// with serialized data. ! /// </summary> ! /// <param name="info"> ! /// The <see cref="SerializationInfo"/> that holds the serialized object ! /// data about the exception being thrown. ! /// </param> ! /// <param name="context"> ! /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. ! /// </param> ! protected PropertyNotFoundException( SerializationInfo info, StreamingContext context ) : base( info, context ) { } + } } \ No newline at end of file Index: WrongClassException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/WrongClassException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WrongClassException.cs 1 Jan 2005 03:35:39 -0000 1.4 --- WrongClassException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 8,12 **** /// </summary> [Serializable] ! public class WrongClassException : HibernateException { private object identifier; --- 9,13 ---- /// </summary> [Serializable] ! public class WrongClassException : HibernateException, ISerializable { private object identifier; *************** *** 14,22 **** /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="identifier"></param> ! /// <param name="type"></param> public WrongClassException( string message, object identifier, System.Type type ) : base( message ) { --- 15,52 ---- /// <summary> ! /// Initializes a new instance of the <see cref="WrongClassException"/> class. /// </summary> ! public WrongClassException( ) ! : base( "A row with the supplied identifier was found but the discriminator specifies a different subclass." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="WrongClassException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! public WrongClassException( string message ) : base( message ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="WrongClassException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public WrongClassException( string message, Exception innerException ) : base( message, innerException ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="WrongClassException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="identifier">The identifier of the object that was being loaded.</param> ! /// <param name="type">The <see cref="System.Type"/> that NHibernate was told to load.</param> public WrongClassException( string message, object identifier, System.Type type ) : base( message ) { *************** *** 25,29 **** } ! /// <summary></summary> public object Identifier { --- 55,61 ---- } ! /// <summary> ! /// Gets the identifier of the object that was being loaded. ! /// </summary> public object Identifier { *************** *** 31,35 **** } ! /// <summary></summary> public System.Type Type { --- 63,69 ---- } ! /// <summary> ! /// Gets the <see cref="System.Type"/> that NHibernate was told to load. ! /// </summary> public System.Type Type { *************** *** 37,41 **** } ! /// <summary></summary> public override string Message { --- 71,78 ---- } ! /// <summary> ! /// Gets a message that describes the current <see cref="WrongClassException"/>. ! /// </summary> ! /// <value>The error message that explains the reason for this exception.</value> public override string Message { *************** *** 48,51 **** --- 85,126 ---- } + #region ISerializable Members + + /// <summary> + /// Initializes a new instance of the <see cref="WrongClassException"/> class + /// with serialized data. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + protected WrongClassException( SerializationInfo info, StreamingContext context ) : base( info, context ) + { + type = (System.Type)info.GetValue( "type", typeof(System.Type) ); + identifier = info.GetValue( "identifier", typeof(object) ) ; + } + + /// <summary> + /// Sets the serialization info for <see cref="WrongClassException"/> after + /// getting the info from the base Exception. + /// </summary> + /// <param name="info"> + /// The <see cref="SerializationInfo"/> that holds the serialized object + /// data about the exception being thrown. + /// </param> + /// <param name="context"> + /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination. + /// </param> + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData( info, context ); + info.AddValue( "type", type, typeof(System.Type) ); + info.AddValue( "identifier", identifier, typeof(object) ); + } + + #endregion } } \ No newline at end of file Index: QueryException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/QueryException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** QueryException.cs 1 Jan 2005 03:35:39 -0000 1.4 --- QueryException.cs 14 Feb 2005 03:17:06 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 7,18 **** /// </summary> [Serializable] ! public class QueryException : HibernateException { private string queryString; /// <summary> ! /// /// </summary> ! /// <param name="message"></param> public QueryException( string message ) : base( message ) { --- 8,26 ---- /// </summary> [Serializable] ! public class QueryException : HibernateException, ISerializable { private string queryString; /// <summary> ! /// Initializes a new instance of the <see cref="QueryException"/> class. /// </summary> ! public QueryException() : base( "The HQL could not be translated to SQL." ) ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="QueryException"/> class. ! /// </summary> ! /// <param name="message">The message that describes the error. </param> public QueryException( string message ) : base( message ) { *************** *** 20,40 **** /// <summary> ! /// /// </summary> ! /// <param name="message"></param> ! /// <param name="e"></param> ! public QueryException( string message, Exception e ) : base( message, e ) { } /// <summary> ! /// /// </summary> ! /// <param name="e"></param> ! public QueryException( Exception e ) : base( e ) { } ! /// <summary></summary> public string QueryString { --- 28,58 ---- /// <summary> ! /// Initializes a new instance of the <see cref="QueryException"/> class. /// </summary> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public QueryException( Exception innerException ) : base( innerException ) { } /// <summary> ! /// Initializes a new instance of the <see cref="QueryException"/> class. /// </summary> ! /// <param name="message">The message that describes the error. </param> ! /// <param name="innerException"> ! /// The exception that is the cause of the current exception. If the innerException parameter ! /// is not a null reference, the current exception is raised in a catch block that handles ! /// the inner exception. ! /// </param> ! public QueryException( string message, Exception innerException ) : base( message, innerException ) { } ! /// <summary> ! /// Gets or sets the <see cref="String"/> of HQL that caused the Exception. ! /// </summary> public string QueryString { *************** *** 43,51 **** } ! /// <summary></summary> public override string Message { get { return base.Message + " [" + queryString + "]"; } } } } \ No newline at end of file --- 61,109 ---- } ! /// <summary> ! /// Gets a message that describes the current <see cref="QueryException"/>. ! /// </summary> ! /// <value>The error message that explains the reason for this exception including the HQL.</value> public override string Message { get { return base.Message + " [" + queryString + "]"; } ... [truncated message content] |