Package com.opencsv.exceptions
Class CsvException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.opencsv.exceptions.CsvException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
CsvConstraintViolationException,CsvDataTypeMismatchException,CsvRequiredFieldEmptyException,CsvValidationException
public class CsvException extends java.lang.ExceptionThis is the base class for all exceptions for opencsv.- Since:
- 3.8
- Author:
- Andrew Rucker Jones
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CsvException()Default constructor, in case no parameters are required.CsvException(java.lang.String message)Constructor that allows a human-readable message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getLine()longgetLineNumber()voidsetLine(java.lang.String[] line)voidsetLineNumber(long lineNumber)
-
-
-
Method Detail
-
getLineNumber
public long getLineNumber()
- Returns:
- 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.
-
setLineNumber
public void setLineNumber(long lineNumber)
- Parameters:
lineNumber- 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.
-
getLine
public java.lang.String[] getLine()
- Returns:
- The line that caused the error if reading and the data are
available. Is always
nullon errors during writing, and may also benullor empty on certain errors that occur during reading. - Since:
- 4.4
-
setLine
public void setLine(java.lang.String[] line)
- Parameters:
line- The line that caused the error on reading. May benull.- Since:
- 4.4
-
-