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

Copybook fromBytes() panic when invalid value provided as a decimal value #6982

Closed
MohamedSabthar opened this issue Sep 11, 2024 · 2 comments · Fixed by ballerina-platform/module-ballerinax-copybook#47
Assignees
Labels

Comments

@MohamedSabthar
Copy link
Member

Description:
The fromBytes() API internally uses the decimal:fromString() method which is currently panics for invalid string instead of returning an error. Refer ballerina-platform/ballerina-lang#43377 for lang issue.

Steps to reproduce:

Affected Versions:

OS, DB, other environment details and versions:

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

@MohamedSabthar
Copy link
Member Author

As a workaround we need to manually call the trap when calling decimal:fromString() method.

@MohamedSabthar MohamedSabthar changed the title Copybook fromBytes() panic when invalid string provided as a decimal value Copybook fromBytes() panic when invalid value provided as a decimal value Sep 11, 2024
Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

@MohamedSabthar MohamedSabthar added the Reason/Other None of the other reasons. label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
1 participant