Class FixedWidthError
- Namespace
- Wolfgang.Etl.FixedWidth
- Assembly
- Wolfgang.Etl.FixedWidth.dll
A record that failed to parse during extraction — a "dead letter". When OnError is set, each failed line is reported as one of these instead of the exception aborting the run (provided Skip is configured to continue). Capture them for logging, a dead-letter queue, or post-run inspection (#29).
public sealed class FixedWidthError
- Inheritance
-
FixedWidthError
- Inherited Members
Constructors
FixedWidthError(long, string?, Exception)
Initializes a new FixedWidthError.
public FixedWidthError(long itemNumber, string? rawContent, Exception exception)
Parameters
itemNumberlongThe 1-based physical source line number of the failed line.
rawContentstringThe original line that failed, or null if unavailable.
exceptionExceptionThe exception the record raised.
Exceptions
- ArgumentNullException
exceptionis null.
Properties
Exception
The exception the record raised — typically a LineTooShortException, MalformedLineException, or FieldConversionException.
public Exception Exception { get; }
Property Value
ItemNumber
The 1-based physical source line number of the failed line — the same value as CurrentLineNumber and the line number in the exception message, matching what a text editor shows. Not a logical record ordinal.
public long ItemNumber { get; }
Property Value
RawContent
The original source line that failed to parse, or null if the stage did not capture it.
public string? RawContent { get; }