using System; using System.Runtime.Serialization; namespace ICSharpCode.SharpZipLib { /// /// Indicates that the input stream could not decoded due to the stream ending before enough data had been provided /// [Serializable] public class UnexpectedEndOfStreamException : StreamDecodingException { private const string GenericMessage = "Input stream ended unexpectedly"; /// /// Initializes a new instance of the UnexpectedEndOfStreamException with a generic message /// public UnexpectedEndOfStreamException() : base(GenericMessage) { } /// /// Initializes a new instance of the UnexpectedEndOfStreamException class with a specified error message. /// /// A message describing the exception. public UnexpectedEndOfStreamException(string message) : base(message) { } /// /// Initializes a new instance of the UnexpectedEndOfStreamException 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 UnexpectedEndOfStreamException(string message, Exception innerException) : base(message, innerException) { } /// /// Initializes a new instance of the UnexpectedEndOfStreamException 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 UnexpectedEndOfStreamException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }