Repository navigation
glz::generic: name key and types in access errors - #3007
Merged
Merged
Conversation
|
One of the tests failed for b48c995. @admin check logs https://download.copr.fedorainfracloud.org/results/packit/stephenberry-glaze-3007/fedora-rawhide-ppc64le/11155420-glaze/builder-live.log, packit dashboard https://dashboard.packit.dev/jobs/copr/4087150 and external service dashboard https://copr.fedorainfracloud.org/coprs/build/11155420/ |
|
One of the tests failed for e9b81de. @admin check logs https://download.copr.fedorainfracloud.org/results/packit/stephenberry-glaze-3007/fedora-rawhide-ppc64le/11155939-glaze/builder-live.log, packit dashboard https://dashboard.packit.dev/jobs/copr/4087583 and external service dashboard https://copr.fedorainfracloud.org/coprs/build/11155939/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3001
glz::genericaccess errors now say what went wrong:glz::generic key not found: "missing"(stillstd::runtime_error).get<T>()type mismatch:glz::generic get: expected double, but holds string.glz::generic key "key": expected object, but holds array/glz::generic index: expected array, but holds string.Type mismatches throw the new
glz::bad_generic_access, which derives fromstd::bad_variant_access, so existing handlers still catch it. Builds without exceptions still abort. Theget_*()andas<T>()accessors get the new messages throughget<T>().Tests are in
exceptions_test, anddocs/generic-json.mdis updated.