Class S100DatasetSchemaException
Thrown when a required HDF5 attribute, dataset, or group is missing from a location that the S-100 spec requires it on, or is present but malformed in a way that cannot be reasonably tolerated. The exception carries the product, file (when known), the HDF5 group path that was being read, the offending attribute/dataset name (when applicable), and a citation into the relevant spec section so that callers can produce actionable diagnostics.
public sealed class S100DatasetSchemaException : Exception, ISerializable
- Inheritance
-
S100DatasetSchemaException
- Implements
- Inherited Members
Constructors
S100DatasetSchemaException(string, string?, string, string?, string?, string, Exception?, string?)
Initializes a new S100DatasetSchemaException.
public S100DatasetSchemaException(string product, string? file, string groupPath, string? attributeOrDataset, string? specReference, string message, Exception? innerException = null, string? additionalContext = null)
Parameters
productstringfilestringgroupPathstringattributeOrDatasetstringspecReferencestringmessagestringinnerExceptionExceptionadditionalContextstring
Properties
AdditionalContext
Optional extra context appended to the message — for example a
note that the dataset declares an unexpected product-specification
edition that may explain the failure. Preserved across
WithFile(string?) so the note is not lost when a processor
attaches the source file name. null when no extra context
is attached.
public string? AdditionalContext { get; }
Property Value
AttributeOrDataset
Name of the missing or malformed attribute or dataset; null
when the failure is the absence of the group itself.
public string? AttributeOrDataset { get; }
Property Value
File
File name (without path) the failure relates to, or null
when the dataset was opened from a stream and the caller hasn't
yet attached the source name (see WithFile(string?)).
public string? File { get; }
Property Value
GroupPath
HDF5 group path, e.g. "/WaterLevel/WaterLevel.03".
public string GroupPath { get; }
Property Value
Product
Product code, e.g. "S-104".
public string Product { get; }
Property Value
SpecReference
Citation into the relevant S-100 spec, e.g.
"S-100 Part 10c §10.2.1.2". null when no
authoritative section number is known.
public string? SpecReference { get; }
Property Value
Methods
WithAdditionalContext(string?)
Returns a copy of this exception with additionalContext
appended to the message. Used by readers to note, for example,
that the dataset declares an unexpected product-specification
edition that may explain a missing-attribute failure.
public S100DatasetSchemaException WithAdditionalContext(string? additionalContext)
Parameters
additionalContextstring
Returns
WithFile(string?)
Returns a copy of this exception with File set to
file. Used by dataset processors to attach the
source file name to an exception thrown by a reader that only had
a stream.
public S100DatasetSchemaException WithFile(string? file)
Parameters
filestring