quickfixj icon indicating copy to clipboard operation
quickfixj copied to clipboard

Enhance exception type and message in FieldMap class setField method

Open amin-moradi opened this issue 3 years ago • 1 comments

This is an enhancement. In class FieldMap, method setField(StringField field) throws a NullPointerException, but it does not mention which field: throw new NullPointerException("Null field values are not allowed.");

I would suggest to throw an exception like following to mention the field name and also a better exception type like FieldException: throw new FieldException(SessionRejectReason.NULL_DATA_FOR_VALUE, field.getField());

amin-moradi avatar Jan 05 '22 15:01 amin-moradi

Sounds like a sensible enhancement. Are you able to provide a PR? Thanks

chrjohn avatar Mar 25 '22 13:03 chrjohn

Sounds like a sensible enhancement. Are you able to provide a PR? Thanks

@chrjohn I would like to give it a try to fix it :)

vinipx avatar Nov 14 '22 20:11 vinipx

@vinipx great, thanks 👍

chrjohn avatar Nov 14 '22 20:11 chrjohn