using System;
using System.Runtime.Serialization;
namespace BLToolkit.DataAccess
{
///
/// Defines the base class for the namespace exceptions.
///
///
/// This class is the base class for exceptions that may occur during
/// execution of the namespace members.
///
[Serializable]
public class DataAccessException : Exception
{
///
/// Initializes a new instance of the class.
///
///
/// This constructor initializes the
/// property of the new instance
/// to a system-supplied message that describes the error,
/// such as "BLToolkit Data Access error has occurred."
///
public DataAccessException()
: base("A Data Access exception has occurred.")
{
}
///
/// Initializes a new instance of the class
/// with the specified error message.
///
/// The message to display to the client when the
/// exception is thrown.
///
public DataAccessException(string message)
: base(message)
{
}
///
/// Initializes a new instance of the class
/// with the specified error message and InnerException property.
///
/// The message to display to the client when the
/// exception is thrown.
/// The InnerException, if any, that threw
/// the current exception.
///
///
public DataAccessException(string message, Exception innerException)
: base(message, innerException)
{
}
///
/// Initializes a new instance of the class
/// with the InnerException property.
///
/// The InnerException, if any, that threw
/// the current exception.
///
public DataAccessException(Exception innerException)
: base(innerException.Message, innerException)
{
}
///
/// Initializes a new instance of the class
/// with serialized data.
///
/// The object that holds the serialized object data.
/// The contextual information about the source or
/// destination.
/// This constructor is called during deserialization to
/// reconstitute the exception object transmitted over a stream.
protected DataAccessException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}