Class FieldConversionException
- Namespace
- Wolfgang.Etl.FixedWidth.Exceptions
- Assembly
- Wolfgang.Etl.FixedWidth.dll
The exception thrown when a field's raw string value cannot be converted to the target property type during a fixed-width read (extract) operation. Derives from MalformedLineException.
public sealed class FieldConversionException : MalformedLineException, ISerializable
- Inheritance
-
FieldConversionException
- Implements
- Inherited Members
Constructors
FieldConversionException(string, long, string, string, Type, string, Exception)
Initializes a new instance of FieldConversionException with full context.
public FieldConversionException(string message, long lineNumber, string lineContent, string fieldName, Type expectedType, string rawValue, Exception innerException)
Parameters
messagestringA message that describes the error.
lineNumberlongThe 1-based line number of the offending line.
lineContentstringThe raw content of the offending line.
fieldNamestringThe name of the property whose value could not be converted.
expectedTypeTypeThe CLR type the raw value was being converted to.
rawValuestringThe raw string value that failed conversion.
innerExceptionExceptionThe underlying conversion exception.
Properties
ExpectedType
The CLR type the raw string value was being converted to.
public Type ExpectedType { get; }
Property Value
FieldName
The name of the property whose value could not be converted.
public string FieldName { get; }
Property Value
RawValue
The raw string value extracted from the line that failed conversion.
public string RawValue { get; }