Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASN 856 parser should not throw exception when non-DTM segment found before HL #116

Merged
merged 3 commits into from
May 4, 2021

Conversation

CodeSmell
Copy link
Collaborator

@CodeSmell CodeSmell commented May 4, 2021

Part of changes for #115

@CodeSmell CodeSmell changed the title 856 parser doesn't throw exception when non-DTM segment found before HL 856 parser should not throw exception when non-DTM segment found before HL May 4, 2021
@CodeSmell CodeSmell changed the title 856 parser should not throw exception when non-DTM segment found before HL ASN 856 parser should not throw exception when non-DTM segment found before HL May 4, 2021
@CodeSmell CodeSmell added the enhancement New feature or request label May 4, 2021
@CodeSmell CodeSmell added this to the 0.3.0 Release milestone May 4, 2021
if (DTMDateTimeReference.IDENTIFIER.equals(segmentId)) {
txSet.addDTMDateTimeReference(DTMDateTimeReferenceParser.parse(currentSegment));
} else {
throw X12ParsingUtil.handleUnexpectedSegment(X12Loop.HIERARCHY_LOOP_ID, segmentId);
Copy link
Collaborator Author

@CodeSmell CodeSmell May 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was debating adding the unexpected segment to a list
List<X12Segment> unexpectedSegmentsBeforeLoop;

this would give the user an opportunity to assess them

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more I thought about it, the more it makes sense to make these segments available... update coming soon

@CodeSmell CodeSmell merged commit 3a4c79b into walmartlabs:master May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants