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:
java.io.Serializable
- Direct Known Subclasses:
SuperCsvConstraintViolationException
public class SuperCsvCellProcessorException extends SuperCsvException
Exception thrown when CellProcessor execution fails (typically due to invalid input) - constraint validating CellProcessors should throwSuperCsvConstraintViolationException
for constraint validation failures.- Since:
- 2.0.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private CellProcessor
processor
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description SuperCsvCellProcessorException(java.lang.Class<?> expectedType, java.lang.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(java.lang.String msg, CsvContext context, CellProcessor processor)
Constructs a new SuperCsvCellProcessorException.SuperCsvCellProcessorException(java.lang.String msg, CsvContext context, CellProcessor processor, java.lang.Throwable t)
Constructs a new SuperCsvCellProcessorException.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CellProcessor
getProcessor()
Gets the processor that was executing.private static java.lang.String
getUnexpectedTypeMessage(java.lang.Class<?> expectedType, java.lang.Object actualValue)
Assembles the exception message when the value received by a CellProcessor isn't of the correct type.java.lang.String
toString()
Returns the String representation of this exception.-
Methods inherited from class org.supercsv.exception.SuperCsvException
getCsvContext
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
processor
private final CellProcessor processor
-
-
Constructor Detail
-
SuperCsvCellProcessorException
public SuperCsvCellProcessorException(java.lang.String msg, CsvContext context, CellProcessor processor)
Constructs a new SuperCsvCellProcessorException.- Parameters:
msg
- the exception messagecontext
- the CSV contextprocessor
- the cell processor that was executing
-
SuperCsvCellProcessorException
public SuperCsvCellProcessorException(java.lang.String msg, CsvContext context, CellProcessor processor, java.lang.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(java.lang.Class<?> expectedType, java.lang.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 Detail
-
getUnexpectedTypeMessage
private static java.lang.String getUnexpectedTypeMessage(java.lang.Class<?> expectedType, java.lang.Object actualValue)
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:
java.lang.NullPointerException
- if expectedType is null
-
getProcessor
public CellProcessor getProcessor()
Gets the processor that was executing.- Returns:
- the processor that was executing
-
toString
public java.lang.String toString()
Returns the String representation of this exception.- Overrides:
toString
in classSuperCsvException
-
-