Plugging customized message to FlatFileParseException
How do i attach the customized exception message ("File is not comma delimited") to the FlatFileParseException?
My class ABCMapper is as shown below... Do i need to implement ItemReader subclass?
ABCMapper class
{
String strFieldSetNames[] = fs.getNames();
try
{
file.setPrice(fs.readBigDecimal("price"));
file.setPromoDate(fs.readDate("prmoDate"));
}
catch(RuntimeException runEx)
{
String strMessage = "";
if(fs.getFieldCount() != strFieldSetNames.length)
{
//Add Customized message to the FlatFileParseException }
}
}