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

Regression in 1.0.0-RC3 causes infinite loop when a parsing error happens #191

Closed
cjmamo opened this issue Mar 13, 2024 · 0 comments · Fixed by #192
Closed

Regression in 1.0.0-RC3 causes infinite loop when a parsing error happens #191

cjmamo opened this issue Mar 13, 2024 · 0 comments · Fixed by #192
Assignees
Labels
bug Something isn't working priority: high
Milestone

Comments

@cjmamo
Copy link
Member

cjmamo commented Mar 13, 2024

Describe the bug

See discussion thread https://groups.google.com/g/smooks-user/c/-XrBoBtgXCU

To Reproduce

Use the EDIFACT reader and set the syntax version in the EDIFACT document to an unsupported one. For example:

UNB+KECA:1+QW:KL+FT:KL+240216:1347+20240216134624'UNH+1+APERAK:D:00A:UN'BGM+294+cgch++1'DTM+137:202402161346:203'DOC+938:::VATDEC'RFF+ACE:cgch'RFF+wd:1'RFF+ws:E'NAD+MS+we'NAD+MR+wd'ERC+ER:E'FTX+AAP+++cgch:(30¿.():'UNT+12+1'UNZ+1+20240216134624' 

Expected behavior

The fatal error should cause the DFDL parser to give up instead of retrying to process the input.

Environment

  • Smooks: 2.0.0-RC3
@cjmamo cjmamo added bug Something isn't working priority: high labels Mar 13, 2024
@cjmamo cjmamo added this to the v1.0.0-RC4 milestone Mar 13, 2024
@cjmamo cjmamo self-assigned this Mar 13, 2024
cjmamo added a commit to cjmamo/smooks-dfdl-cartridge that referenced this issue Mar 13, 2024
throw DfdlParserSmooksException and DfdlUnparserSmooksException instead of broad SmooksException

Refs: smooks#191
@cjmamo cjmamo linked a pull request Mar 13, 2024 that will close this issue
cjmamo added a commit to cjmamo/smooks-dfdl-cartridge that referenced this issue Mar 13, 2024
throw DfdlParserSmooksException and DfdlUnparserSmooksException instead of broad SmooksException

Refs: smooks#191
cjmamo added a commit that referenced this issue Mar 13, 2024
* fix: throw exception when the parse result is a parsing error

throw DfdlParserSmooksException and DfdlUnparserSmooksException instead of broad SmooksException

Refs: #191

* test: remove unused class

* test: change expected exception type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: high
Development

Successfully merging a pull request may close this issue.

1 participant