Class CsvParseException
- Namespace
- FlameCsv.Exceptions
- Assembly
- FlameCsv.Core.dll
Represents an error of an unparseable value.
public sealed class CsvParseException : Exception, ISerializable
- Inheritance
-
objectExceptionCsvParseException
- Implements
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
messagestringinnerExceptionException
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
Line
Line of the record where the exception occurred.
public int? Line { get; set; }
Property Value
- int?
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 ("").
RecordPosition
Start position of the record where the exception occurred.
public long? RecordPosition { get; set; }
Property Value
- long?
RecordValue
Raw value of the record as a string.
public string? RecordValue { get; set; }
Property Value
Target
If available, name of the target property, field, or parameter.
public string? Target { get; set; }
Property Value
TargetType
Target type of the conversion.
public Type? TargetType { get; set; }
Property Value
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
fieldIndexintIndex of the field in the record
parsedTypeTypeConverted type
converterobjectConverter used
targetstringIf available, name of the target