Details
Description
Whenever a parsing error occurs, an InvalidMessage exception is thrown but is never reported and the processing continues to the validation method which may or not find a validation error. If, for instance, a LENGTH type field is missing for a specific DATA field, the error reported is:
Invalid message: Actual body length=x, Expected body length=x
whereas the real error is that the LENGTH field is missing.
form the fromString method of the Message class:
try
{ parseHeader(dd); parseBody(dd); parseTrailer(dd); }catch (InvalidMessage e)
{ isValidStructure = false; }if (doValidation)
{ validate(messageData); }