Migrate IOExceptions to N5IOExceptions for ReadData and related logic - #155
Merged
Conversation
cmhulbert
force-pushed
the
readDataN5IOExceptions
branch
from
June 3, 2025 12:46
e6c68c8 to
91e8284
Compare
cmhulbert
force-pushed
the
readDataN5IOExceptions
branch
from
June 3, 2025 12:53
91e8284 to
19c863e
Compare
Contributor
Author
|
Generally happy with this change. I think we should consider even more what to do with IOExceptions, especially in KeyValueAccess implementations. Specifically, LockedChannel still throws IOExceptions, and we may want to wrap those as well. Not necessarily for this PR though |
cmhulbert
force-pushed
the
readDataN5IOExceptions
branch
from
June 3, 2025 12:54
19c863e to
c61aa5e
Compare
Contributor
Author
|
Generally I tried to remove any IOExceptions in favore of N5IOExceptions for all interface methods, especially for KeyValueAccess. Implementations are still welcome to throw IOExceptions where appropriate internally. but should wrap IOExceptions to N5IOExceptions before throwing in public API methods. |
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.
when working with data backed by ReadData, it's not possible to know where the underlying data is coming from. We expect to deal with N5IOExceptions rather than IOException, especially when the ReadData is wrapping a KeyValueAccess read/write. This has the added benefit of letting the ReadData provider wrap the specific IOException with an appropriate N5 specific N5IOException, such as N5NoSuchKeyException.