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

TASK: Improve JSON error handling #5196

Open
wants to merge 1 commit into
base: 9.0
Choose a base branch
from

Conversation

bwaidelich
Copy link
Member

Replaces all @throws JsonException annotations with a try/catch block.

Background:

Adding the @throws tag means that this exception has to be handled in the calling side. But in the affected cases the JSON that is to be en/decoded does not come from a foreign source. So an exception in those cases is very unlikely – i.e. exceptional.

Besides, throwing an expception with more context, will make ease debugging of those cases

Replaces all `@throws JsonException` annotations with a try/catch block.

Background:

Adding the `@throws` tag means that this exception has to be handled in the calling side.
But in the affected cases the JSON that is to be en/decoded does not come from a foreign source. So an exception in those cases is very unlikely – i.e. exceptional.

Besides, throwing an expception with more context, will make ease debugging of those cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant