Class CsvReadException
- Namespace
- FlameCsv.Exceptions
- Assembly
- FlameCsv.Core.dll
Thrown for faulty but structurally valid CSV.
public class CsvReadException : CsvReadExceptionBase, ISerializable
- Inheritance
-
objectExceptionCsvReadException
- Implements
- Inherited Members
Constructors
CsvReadException(string?, Exception?)
Thrown for faulty but structurally valid CSV.
public CsvReadException(string? message = null, Exception? innerException = null)
Parameters
messagestringinnerExceptionException
Properties
ActualFieldCount
The actual field count.
public required int ActualFieldCount { get; init; }
Property Value
ExpectedFieldCount
The expected field count.
public required int ExpectedFieldCount { get; init; }
Property Value
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 ("").
Methods
ThrowForInvalidFieldCount<T>(int, CsvRecordRef<T>)
Throws an exception for a CSV record having an invalid number of fields.
[DoesNotReturn]
public static void ThrowForInvalidFieldCount<T>(int expected, CsvRecordRef<T> record) where T : unmanaged, IBinaryInteger<T>
Parameters
expectedintrecordCsvRecordRef<T>
Type Parameters
T