Table of Contents

Class CsvParseException

Namespace
FlameCsv.Exceptions
Assembly
FlameCsv.Core.dll

Represents an error of an unparseable value.

public sealed class CsvParseException : CsvReadExceptionBase, ISerializable
Inheritance
object
Exception
CsvParseException
Implements
Inherited Members

Remarks

Initializes an exception representing an unparseable value.

Constructors

CsvParseException(string?, Exception?)

Represents an error of an unparseable value.

public CsvParseException(string? message = null, Exception? innerException = null)

Parameters

message string
innerException Exception

Remarks

Initializes an exception representing an unparseable value.

Properties

Converter

Converter instance.

public object? Converter { get; set; }

Property Value

object

FieldIndex

Index of the field in the record.

public int? FieldIndex { get; set; }

Property Value

int?

FieldPosition

Start position of the field where the exception occurred.

public long? FieldPosition { get; set; }

Property Value

long?

FieldValue

Raw value of the field as a string.

public string? FieldValue { get; set; }

Property Value

string

HeaderValue

Header of the field where the exception occurred.

public string? HeaderValue { get; set; }

Property Value

string

Message

Gets a message that describes the current exception.

public override string Message { get; }

Property Value

string

The error message that explains the reason for the exception, or an empty string ("").

Target

If available, name of the target property, field, or parameter.

public string? Target { get; set; }

Property Value

string

TargetType

Target type of the conversion.

public Type? TargetType { get; set; }

Property Value

Type

Methods

Throw(int, Type, object, string)

Throws an exception for a field that could not be parsed.

[DoesNotReturn]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void Throw(int fieldIndex, Type parsedType, object converter, string target)

Parameters

fieldIndex int

Index of the field in the record

parsedType Type

Converted type

converter object

Converter used

target string

If available, name of the target

Exceptions

CsvParseException