Top Description Fields Constructors Methods
com.opencsv.exceptions

public Class CsvException

extends Exception
Class Inheritance
Known Direct Subclasses
com.opencsv.exceptions.CsvFieldAssignmentException, com.opencsv.exceptions.CsvChainedException
Imports
org.apache.commons.lang3.ArrayUtils

This is the base class for all exceptions for opencsv.
Author
Andrew Rucker Jones
Since
3.8

Field Summary

Modifier and TypeField and Description
private String[]
private long
private static final long

Constructor Summary

AccessConstructor and Description
public
CsvException()

Default constructor, in case no parameters are required.

public
CsvException(String
The error text
message
)

Constructor that allows a human-readable message.

Method Summary

Modifier and TypeMethod and Description
public String[]
getLine()

Returns: The line that caused the error if reading and the data are available.

public long
getLineNumber()

Returns: The line number that caused the error.

public void
setLine(String[]
The line that caused the error on reading. May be null.
line
)

public void
setLineNumber(long
The line number that caused the error. This should be the one-based number of the line that caused the error, not including the header line, if present.
lineNumber
)

Field Detail

lineback to summary
private String[] line
lineNumberback to summary
private long lineNumber
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Constructor Detail

CsvExceptionback to summary
public CsvException()

Default constructor, in case no parameters are required.

CsvExceptionback to summary
public CsvException(String message)

Constructor that allows a human-readable message.

Parameters
message:String

The error text

Method Detail

getLineback to summary
public String[] getLine()
Returns:String[]

The line that caused the error if reading and the data are available. Is always null on errors during writing, and may also be null or empty on certain errors that occur during reading.

Since
4.4
getLineNumberback to summary
public long getLineNumber()
Returns:long

The line number that caused the error. This should be the one-based number of the line that caused the error, not including the header line, if present.

setLineback to summary
public void setLine(String[] line)
Parameters
line:String[]

The line that caused the error on reading. May be null.

Since
4.4
setLineNumberback to summary
public void setLineNumber(long lineNumber)
Parameters
lineNumber:long

The line number that caused the error. This should be the one-based number of the line that caused the error, not including the header line, if present.