Table of Contents

Class CsvException

Namespace
Acuit.Pinpoint.Common
Assembly
Acuit.Pinpoint.Common.dll

A comma-separated values file parsing error.

[Serializable]
public class CsvException : Exception, ISerializable, _Exception
Inheritance
CsvException
Implements
Inherited Members
Extension Methods

Constructors

CsvException()

Initializes a new instance of the CsvException class.

public CsvException()

CsvException(int, int, Exception)

Initializes a new instance of the CsvException class with a specified parameters and error exception.

public CsvException(int lineNumber, int fieldNumber, Exception exception)

Parameters

lineNumber int

The line number in the CSV file at which the error occurred.

fieldNumber int

The field number at which the error occurred.

exception Exception

The exception that describes the error. This, prefaced with the line and field numbers (if non-zero), will make up the exception message.

CsvException(int, int, string)

Initializes a new instance of the CsvException class with a specified parameters and error message.

public CsvException(int lineNumber, int fieldNumber, string errorMessage)

Parameters

lineNumber int

The line number in the CSV file at which the error occurred.

fieldNumber int

The field number at which the error occurred.

errorMessage string

The message that describes the error. This, prefaced with the line and field numbers (if non-zero), will make up the exception message.

CsvException(int, int, string, Exception)

Initializes a new instance of the CsvException class with a specified parameters and error message.

public CsvException(int lineNumber, int fieldNumber, string errorMessage, Exception inner)

Parameters

lineNumber int

The line number in the CSV file at which the error occurred.

fieldNumber int

The field number at which the error occurred.

errorMessage string

The message that describes the error. This, prefaced with the line and field numbers (if non-zero), will make up the exception message.

inner Exception

The exception that is the cause of the current exception. If the inner parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.

CsvException(SerializationInfo, StreamingContext)

Initializes a new instance of the CsvException class with serialized data.

protected CsvException(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The object that holds the serialized object data.

context StreamingContext

The contextual information about the source or destination.

Exceptions

ArgumentNullException

info is null.

CsvException(string)

Initializes a new instance of the CsvException class with a specified error message.

public CsvException(string message)

Parameters

message string

The message that describes the error.

CsvException(string, Exception)

Initializes a new instance of the CsvException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public CsvException(string message, Exception inner)

Parameters

message string

The message that describes the error.

inner Exception

The exception that is the cause of the current exception. If the inner parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.

Properties

FieldNumber

Gets or sets the field number at which the error occurred.

public int FieldNumber { get; set; }

Property Value

int

Remarks

The first field is 1. If there is not an applicable field number, this will be zero.

LineNumber

Gets or sets the line number in the CSV file at which the error occurred.

public int LineNumber { get; set; }

Property Value

int

Remarks

The first line is 1. If there is not an applicable line number, this will be zero.

Methods

GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo with the data needed to serialize the target object.

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo to populate with data.

context StreamingContext

The destination (see StreamingContext) for this serialization.

Exceptions

ArgumentNullException

info is null.