using System; using System.Runtime.Serialization; namespace Substrate { /// /// A base class for all Substrate-related exception classes. /// [Serializable] public class SubstrateException : Exception { /// /// Initializes a new instance of the class. /// public SubstrateException () : base() { } /// /// Initializes a new instance of the class with a custom error message. /// /// A custom error message. public SubstrateException (string message) : base(message) { } /// /// Initializes a new instance of the class with a custom error message and a reference to /// an InnerException representing the original cause of the exception. /// /// A custom error message. /// A reference to the original exception that caused the error. public SubstrateException (string message, Exception innerException) : base(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. protected SubstrateException (SerializationInfo info, StreamingContext context) : base(info, context) { } } }