Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Id
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11213/NHibernate/Id
Modified Files:
IdentifierGenerationException.cs
Log Message:
Followed FxCops rules on creating custom exceptions and supporting
serialization. However, they still inherit from ApplicationException.
Index: IdentifierGenerationException.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/IdentifierGenerationException.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** IdentifierGenerationException.cs 31 Dec 2004 18:56:49 -0000 1.5
--- IdentifierGenerationException.cs 14 Feb 2005 03:17:06 -0000 1.6
***************
*** 1,3 ****
--- 1,4 ----
using System;
+ using System.Runtime.Serialization;
namespace NHibernate.Id
***************
*** 10,16 ****
{
/// <summary>
! ///
/// </summary>
! /// <param name="message"></param>
public IdentifierGenerationException( string message ) : base( message )
{
--- 11,24 ----
{
/// <summary>
! /// Initializes a new instance of the <see cref="IdentifierGenerationException"/> class.
/// </summary>
! public IdentifierGenerationException( ) : base( "An exception occurred during ID generation." )
! {
! }
!
! /// <summary>
! /// Initializes a new instance of the <see cref="IdentifierGenerationException"/> class.
! /// </summary>
! /// <param name="message">The message that describes the error.</param>
public IdentifierGenerationException( string message ) : base( message )
{
***************
*** 18,28 ****
/// <summary>
! ///
/// </summary>
! /// <param name="message"></param>
! /// <param name="e"></param>
public IdentifierGenerationException( string message, Exception e ) : base( message, e )
{
}
}
}
\ No newline at end of file
--- 26,55 ----
/// <summary>
! /// Initializes a new instance of the <see cref="IdentifierGenerationException"/> class.
/// </summary>
! /// <param name="message">The message that describes the error.</param>
! /// <param name="e">
! /// 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 IdentifierGenerationException( string message, Exception e ) : base( message, e )
{
}
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="IdentifierGenerationException"/> 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 IdentifierGenerationException( SerializationInfo info, StreamingContext context ) : base( info, context )
+ {
+ }
}
}
\ No newline at end of file
|