using System; using System.Runtime.Serialization; namespace BLToolkit.TypeBuilder { /// /// 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 TypeBuilderException : Exception { /// /// Initializes a new instance of the class. /// /// /// This constructor initializes the /// property of the new instance such as "A Build Type exception has occurred." /// public TypeBuilderException() : base("A Build Type 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 TypeBuilderException(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 TypeBuilderException(string message, Exception innerException) : base(message, innerException) { } /// /// Initializes a new instance of the class /// with the specified InnerException property. /// /// The InnerException, if any, that threw /// the current exception. /// public TypeBuilderException(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 TypeBuilderException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }