Class
ArchiveCorruptionException
OfficeIMO.Archives
Malformed archive or compressed data. Names the format, the byte offset in the input where the problem was found and the structure that was expected there.
Inheritance
- IOException
- ArchiveCorruptionException
Remarks
Derives from IOException, like OfficeInspectionResourceLimitException. Readers that predate it still report corruption as InvalidDataException.
Constructors
ArchiveCorruptionException 2 overloads
public ArchiveCorruptionException(string format, long offset, string expected) #Creates the exception for format data that is invalid at offset.
Parameters
- format string
- The format being decoded, for example Zstandard.
- offset long
- Zero-based byte offset in the input, counted from where decoding started.
- expected string
- What the decoder expected at that offset.
public ArchiveCorruptionException(string format, long offset, string expected, Exception? innerException) #Creates the exception with the error that caused it.
Parameters
- format string
- The format being decoded, for example Zstandard.
- offset long
- Zero-based byte offset in the input, counted from where decoding started.
- expected string
- What the decoder expected at that offset.
- innerException System.Exception?
- The error that caused this one, or null.
Inherited Methods
public virtual void GetObjectData(SerializationInfo info, StreamingContext context) #Inherited from Exception
Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}") EditorBrowsable(1)Parameters
- info SerializationInfo
- context StreamingContext
Properties
public long Offset { get; } #Zero-based byte offset in the input where the problem was found.
public string Expected { get; } #What the decoder expected at ArchiveCorruptionException.Offset.
Inherited Properties
public MethodBase? TargetSite { get; } #Inherited from Exception
public virtual string Message { get; } #Inherited from Exception
public virtual IDictionary Data { get; } #Inherited from Exception
public Exception? InnerException { get; } #Inherited from Exception
public virtual string? HelpLink { get; set; } #Inherited from Exception
public virtual string? Source { get; set; } #Inherited from Exception
public int HResult { get; set; } #Inherited from Exception
public virtual string? StackTrace { get; } #Inherited from Exception