using System; using System.Runtime.Serialization; namespace ICSharpCode.SharpZipLib { /// /// Indicates that an error occurred during decoding of a input stream due to corrupt /// data or (unintentional) library incompatibility. /// [Serializable] public class StreamDecodingException : SharpZipBaseException { private const string GenericMessage = "Input stream could not be decoded"; /// /// Initializes a new instance of the StreamDecodingException with a generic message /// public StreamDecodingException() : base(GenericMessage) { } /// /// Initializes a new instance of the StreamDecodingException class with a specified error message. /// /// A message describing the exception. public StreamDecodingException(string message) : base(message) { } /// /// Initializes a new instance of the StreamDecodingException class with a specified /// error message and a reference to the inner exception that is the cause of this exception. /// /// A message describing the exception. /// The inner exception public StreamDecodingException(string message, Exception innerException) : base(message, innerException) { } /// /// Initializes a new instance of the StreamDecodingException class with serialized data. /// /// /// The System.Runtime.Serialization.SerializationInfo that holds the serialized /// object data about the exception being thrown. /// /// /// The System.Runtime.Serialization.StreamingContext that contains contextual information /// about the source or destination. /// protected StreamDecodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }