Class FieldValidationException
- Namespace
- CsvHelper
- Assembly
- CsvHelper.dll
Represents a user supplied field validation failure.
public class FieldValidationException : ValidationException, ISerializable
- Inheritance
-
FieldValidationException
- Implements
- Inherited Members
Constructors
FieldValidationException(CsvContext, string)
Initializes a new instance of the ValidationException class.
public FieldValidationException(CsvContext context, string field)
Parameters
context
CsvContextThe reading context.
field
stringThe field that failed validation.
FieldValidationException(CsvContext, string, string)
Initializes a new instance of the ValidationException class with a specified error message.
public FieldValidationException(CsvContext context, string field, string message)
Parameters
context
CsvContextThe reading context.
field
stringThe field that failed validation.
message
stringThe message that describes the error.
FieldValidationException(CsvContext, string, string, Exception)
Initializes a new instance of the ValidationException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public FieldValidationException(CsvContext context, string field, string message, Exception innerException)
Parameters
context
CsvContextThe reading context.
field
stringThe field that failed validation.
message
stringThe error message that explains the reason for the exception.
innerException
ExceptionThe exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Properties
Field
Gets the field that failed validation.
public string Field { get; }