Skip to content

chore: better error handling of nlohmann json lib apis#95

Merged
Fokko merged 2 commits into
apache:mainfrom
zhjwpku:json_switchoff_exception
May 12, 2025
Merged

chore: better error handling of nlohmann json lib apis#95
Fokko merged 2 commits into
apache:mainfrom
zhjwpku:json_switchoff_exception

Conversation

@zhjwpku

@zhjwpku zhjwpku commented May 11, 2025

Copy link
Copy Markdown
Collaborator
  1. switch off exceptions for nlohmann::json::parse

  2. add a no except wrapper around json.dump, since we don't handle exceptions in Error messages.

This closes issue #87

References:

1. switch off exceptions for nlohmann::json::parse

2. add a no except wrapper around json.dump, since we don't
   handle exceptions in Error messages.

This closes issue apache#87

References:

- https://json.nlohmann.me/features/parsing/parse_exceptions/
- https://json.nlohmann.me/api/basic_json/dump/

Signed-off-by: Junwang Zhao <zhjwpku@gmail.com>
Comment thread src/iceberg/json_internal.cc Outdated
Comment thread src/iceberg/json_internal.cc Outdated
Comment thread src/iceberg/json_internal.cc Outdated
Signed-off-by: Junwang Zhao <zhjwpku@gmail.com>

@wgtmac wgtmac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@Fokko

Fokko commented May 12, 2025

Copy link
Copy Markdown
Contributor

Thanks for working on this @zhjwpku, and thanks @lidavidm and @wgtmac for the quick review 🙌

@Fokko Fokko merged commit 5aed8f5 into apache:main May 12, 2025
6 checks passed
@zhjwpku zhjwpku deleted the json_switchoff_exception branch May 12, 2025 13:10
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 this pull request may close these issues.

4 participants