using System; using System.Runtime.Serialization; namespace Substrate.Nbt { /// /// The exception that is thrown when errors occur during Nbt IO operations. /// /// In most cases, the property will contain more detailed information on the /// error that occurred. [Serializable] public class NbtIOException : Exception { /// /// Initializes a new instance of the class. /// public NbtIOException () : base() { } /// /// Initializes a new instance of the class with a custom error message. /// /// A custom error message. public NbtIOException (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 NbtIOException (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 NbtIOException (SerializationInfo info, StreamingContext context) : base(info, context) { } } }