Improve parsing of invalid data, throwing more specific messages
git-svn-id: https://j8583.svn.sourceforge.net/svnroot/j8583/j8583@108 db60a039-f72e-0410-b1d2-baa000846441
This commit is contained in:
@@ -39,7 +39,7 @@ public class DateExpParseInfo extends FieldParseInfo {
|
||||
@Override
|
||||
public IsoValue<Date> parse(byte[] buf, int pos, CustomField<?> custom) throws ParseException {
|
||||
if (pos < 0) {
|
||||
throw new ParseException(String.format("Invalid position %d", pos), pos);
|
||||
throw new ParseException(String.format("Invalid DATE_EXP position %d", pos), pos);
|
||||
}
|
||||
if (pos+4 > buf.length) {
|
||||
throw new ParseException(String.format("Insufficient data for DATE_EXP field, pos %d", pos), pos);
|
||||
|
||||
Reference in New Issue
Block a user