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

message string

A message that describes the error.

lineNumber long

The 1-based line number of the offending line.

lineContent string

The raw content of the offending line.

fieldName string

The name of the property whose value could not be converted.

expectedType Type

The CLR type the raw value was being converted to.

rawValue string

The raw string value that failed conversion.

innerException Exception

The underlying conversion exception.

Properties

ExpectedType

The CLR type the raw string value was being converted to.

public Type ExpectedType { get; }

Property Value

Type

FieldName

The name of the property whose value could not be converted.

public string FieldName { get; }

Property Value

string

RawValue

The raw string value extracted from the line that failed conversion.

public string RawValue { get; }

Property Value

string