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

Throw exception if parsing null #1

Open
Lewiscowles1986 opened this issue Aug 26, 2019 · 0 comments · May be fixed by #2
Open

Throw exception if parsing null #1

Lewiscowles1986 opened this issue Aug 26, 2019 · 0 comments · May be fixed by #2

Comments

@Lewiscowles1986
Copy link

Looks like you recently added a check for JSON so that if the type is null, you throw an error. Surely the same check would apply to the YAML and allow you to avoid nullable returns which push error handling out of library into consumer code.

Lewiscowles1986 pushed a commit to Lewiscowles1986/php-rx that referenced this issue Aug 26, 2019
using defaults, enable the same exception as was used for JSON, to be used for YAML

move the check for JSON so that undefined types result in error case always (rather than defaulting to JSON decode with 'Unknown' as the outcome from non-js/json file extension

Fixes shaggy8871#1
Lewiscowles1986 pushed a commit to Lewiscowles1986/php-rx that referenced this issue Aug 26, 2019
using defaults, enable the same exception as was used for JSON, to be used for YAML

move the check for JSON so that undefined types result in error case always (rather than defaulting to JSON decode with 'Unknown' as the outcome from non-js/json file extension

Fixes shaggy8871#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant