Table of Contents

BiffFormatException Class

Definition

Namespace
Bodu.IO.Biff
Assembly
Bodu.IO.Biff.dll
Package
Bodu.IO.Biff 1.0.0
Source
BiffFormatException.cs

The exception thrown when BIFF data is structurally invalid: a record header is truncated, a declared payload runs past the available data, or a known record's payload does not match its documented layout.

public sealed class BiffFormatException : FormatException, ISerializable
Inheritance
BiffFormatException
Implements
Inherited Members
Extension Methods

Remarks

A record type the codec does not recognize is never reported through this exception; unknown records remain readable through their identifier and raw payload. When the failure is tied to a position in the data, Offset carries the byte offset of the record header relative to the start of the buffer the reader was created over.

Constructors

BiffFormatException()

Initializes a new instance of the BiffFormatException class.

public BiffFormatException()

BiffFormatException(string?)

Initializes a new instance of the BiffFormatException class with the specified message.

public BiffFormatException(string? message)

Parameters

message string

The message that describes the error.

BiffFormatException(string?, Exception?)

Initializes a new instance of the BiffFormatException class with the specified message and inner exception.

public BiffFormatException(string? message, Exception? innerException)

Parameters

message string

The message that describes the error.

innerException Exception

The exception that is the cause of the current exception.

BiffFormatException(string?, int)

Initializes a new instance of the BiffFormatException class with the specified message and the offset of the record at which the failure was detected.

public BiffFormatException(string? message, int offset)

Parameters

message string

The message that describes the error.

offset int

The byte offset of the offending record header within the source buffer.

Properties

Offset

Gets the byte offset of the record at which the failure was detected, relative to the start of the buffer the reader was created over.

public int? Offset { get; }

Property Value

int?

The record header offset, or null when the failure is not tied to a position.

Applies to

ProductVersions
.NET8, 10