Skip to content

RFC: Improve unserialize() error handling #9425

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

Closed
wants to merge 3 commits into from

Conversation

TimWolla
Copy link
Member

@TimWolla TimWolla commented Aug 25, 2022

@TimWolla TimWolla changed the title Wrap exceptions during unserialization in UnserializationFailedException Pre-RFC: Wrap exceptions during unserialization in UnserializationFailedException Aug 25, 2022
@bwoebi
Copy link
Member

bwoebi commented Aug 25, 2022

When we are making this step, I think we should make it completely consistent - either unserialization can fail with exception or have warnings and gracefully handle that.

But I don't think we should have some modes throwing and some modes warning. Doesn't make too much sense to me, especially given that unserialize is supposed to only ever come from trusted contexts with data which should never be invalid.

@TimWolla
Copy link
Member Author

TimWolla commented Aug 25, 2022

Doesn't make too much sense to me, especially given that unserialize is supposed to only ever come from trusted contexts with data which should never be invalid.

Yes, I absolutely agree here and would love to change all the warnings / notices during unserialization to an Exception.

FWIW: A throwing error-handler would result in UnserializationFailedException with this PR. So this is primarily about the users who don't use one.

@TimWolla TimWolla force-pushed the unserialization-failed branch from 598498d to ab91b5d Compare August 30, 2022 20:35
@TimWolla TimWolla changed the title Pre-RFC: Wrap exceptions during unserialization in UnserializationFailedException RFC: Improve unserialize() error handling Sep 5, 2022
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.

2 participants