using System; using System.Runtime.Serialization; namespace BLToolkit.Mapping { /// /// Defines the base class for the namespace exceptions. /// /// /// This class is the base class for exceptions that may occur during /// the execution of the class and other namespace members. /// [Serializable] public class MappingException : 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 "A Mapping exception has occurred." /// public MappingException() : base("A Mapping 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 MappingException(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 MappingException(string message, Exception innerException) : base(message, innerException) { } /// /// Initializes a new instance of the class /// with the specified InnerException property. /// /// exception is thrown. /// The InnerException, if any, that threw /// the current exception. /// public MappingException(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 MappingException(SerializationInfo info, StreamingContext context) : base(info,context) { } } }