Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ArchiveCorruptionException

OfficeIMO.Archives

Namespace
OfficeIMO.Archives
Assembly
OfficeIMO.Archives
Source revision
273d35d5ba8a with working tree changes
Base
IOException
Implements
ISerializable
Modifiers
sealed

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 required
The format being decoded, for example Zstandard.
offset long required
Zero-based byte offset in the input, counted from where decoding started.
expected string required
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 required
The format being decoded, for example Zstandard.
offset long required
Zero-based byte offset in the input, counted from where decoding started.
expected string required
What the decoder expected at that offset.
innerException System.Exception? required
The error that caused this one, or null.

Properties

public string Format { get; } #

The format being decoded.

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.