public class CsvChainedException extends CsvException
| Constructor and Description |
|---|
CsvChainedException(CsvFieldAssignmentException csve)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(CsvFieldAssignmentException csve)
Add an exception to the chain of collections.
|
List<CsvFieldAssignmentException> |
getExceptionChain() |
CsvFieldAssignmentException |
getFirstException()
Convenience method to return the first exception from the exception chain.
|
boolean |
hasOnlyOneException()
Convenience method that checks if the chain only has a single exception.
|
void |
setLine(String[] line)
Sets the line for all exceptions collected.
|
void |
setLineNumber(long lineNumber)
Sets the line number for all exceptions collected.
|
getLine, getLineNumberaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic CsvChainedException(CsvFieldAssignmentException csve)
csve - The first exception for the list being collected.
Must not be null.public void add(CsvFieldAssignmentException csve)
csve - Exception to be added to this chain.
Must not be null.public List<CsvFieldAssignmentException> getExceptionChain()
public void setLine(String[] line)
setLine in class CsvExceptionline - The line that caused the error on reading. May be
null.public void setLineNumber(long lineNumber)
setLineNumber in class CsvExceptionlineNumber - 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.public boolean hasOnlyOneException()
true if chain has only a single exception,
false otherwisepublic CsvFieldAssignmentException getFirstException()
CsvFieldAssignmentException at the first position in the
list, null otherwise.Copyright © 2005–2025. All rights reserved.