Package org.supercsv.exception
Class SuperCsvCellProcessorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.supercsv.exception.SuperCsvException
org.supercsv.exception.SuperCsvCellProcessorException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SuperCsvConstraintViolationException
Exception thrown when CellProcessor execution fails (typically due to invalid input) - constraint validating
CellProcessors should throw
SuperCsvConstraintViolationException
for constraint validation failures.- Since:
- 2.0.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSuperCsvCellProcessorException
(Class<?> expectedType, Object actualValue, CsvContext context, CellProcessor processor) Constructs a new SuperCsvCellProcessorException to indicate that the value received by a CellProcessor wasn't of the correct type.SuperCsvCellProcessorException
(String msg, CsvContext context, CellProcessor processor) Constructs a new SuperCsvCellProcessorException.SuperCsvCellProcessorException
(String msg, CsvContext context, CellProcessor processor, Throwable t) Constructs a new SuperCsvCellProcessorException. -
Method Summary
Modifier and TypeMethodDescriptionGets the processor that was executing.private static String
getUnexpectedTypeMessage
(Class<?> expectedType, Object actualValue) Assembles the exception message when the value received by a CellProcessor isn't of the correct type.toString()
Returns the String representation of this exception.Methods inherited from class org.supercsv.exception.SuperCsvException
getCsvContext
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
processor
-
-
Constructor Details
-
SuperCsvCellProcessorException
Constructs a new SuperCsvCellProcessorException.- Parameters:
msg
- the exception messagecontext
- the CSV contextprocessor
- the cell processor that was executing
-
SuperCsvCellProcessorException
public SuperCsvCellProcessorException(String msg, CsvContext context, CellProcessor processor, Throwable t) Constructs a new SuperCsvCellProcessorException.- Parameters:
msg
- the exception messagecontext
- the CSV contextprocessor
- the cell processor that was executingt
- the nested exception
-
SuperCsvCellProcessorException
public SuperCsvCellProcessorException(Class<?> expectedType, Object actualValue, CsvContext context, CellProcessor processor) Constructs a new SuperCsvCellProcessorException to indicate that the value received by a CellProcessor wasn't of the correct type.- Parameters:
expectedType
- the expected typeactualValue
- the value received by the CellProcessorcontext
- the CSV contextprocessor
- the cell processor that was executing
-
-
Method Details
-
getUnexpectedTypeMessage
Assembles the exception message when the value received by a CellProcessor isn't of the correct type.- Parameters:
expectedType
- the expected typeactualValue
- the value received by the CellProcessor- Returns:
- the message
- Throws:
NullPointerException
- if expectedType is null
-
getProcessor
Gets the processor that was executing.- Returns:
- the processor that was executing
-
toString
Returns the String representation of this exception.- Overrides:
toString
in classSuperCsvException
-