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

Swallow exceptions when calling toString on ConfigProxy objects #743

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

akang31
Copy link
Contributor

@akang31 akang31 commented Feb 13, 2025

We are currently running into an issue where a user has extended the ConfigProxy interface in a custom manner, adding support for, effectively, Map<String, JSONObject>. We do not support this kind of map (as our decoders assume that a single value is decoded into values, instead of collapsing a tree into a single object).

We want to avoid unnecessary logging for this case, so specifically for the toString call on ConfigProxy objects, we choose to swallow exceptions.

Copy link

@nowucca nowucca left a comment

Choose a reason for hiding this comment

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

I don't mind swallow as a word here, but could also use Ignores.
Up to you.

invokeIgnoringErrors
IgnoresErrorsProperty
getIgnoresErrors

@akang31
Copy link
Contributor Author

akang31 commented Feb 14, 2025

I don't mind swallow as a word here, but could also use Ignores. Up to you.

invokeIgnoringErrors IgnoresErrorsProperty getIgnoresErrors

I like ignore as well here, switched to ignore

@akang31 akang31 merged commit 29abe3b into 2.x Feb 14, 2025
10 checks passed
@akang31 akang31 deleted the 2.x-toString-swallow-exceptions branch February 14, 2025 03:06
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.

3 participants