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

Go through tryo usages, see if they are as far in as possible #7133

Closed
fm3 opened this issue Jun 12, 2023 · 1 comment · Fixed by #7209
Closed

Go through tryo usages, see if they are as far in as possible #7133

fm3 opened this issue Jun 12, 2023 · 1 comment · Fixed by #7209

Comments

@fm3
Copy link
Member

fm3 commented Jun 12, 2023

Some of our own code is wrapped in tryo. We should go through the usages and see what exceptions this is about, and if the tryo can be moved further in, wrapping third-party code only.

Also, in the wake of this, it may be worth introducing the shortcut Fox.tryo, which turns the box into a fox directly.

@fm3
Copy link
Member Author

fm3 commented Jul 17, 2023

I went through the 51 usages. Here are the ones that seem not ideal, where the tryo could be moved further in to make the caught exceptions more explicit:

  • around VolumeBucketCompression.decompressIfNeeded (cannot be easily made to return a box because of iterator usage elsewhere)
  • chunkTyper.wrapAndType
  • BytesConverter.toByteArray
  • dataExtractor.readBytesAndHeader
  • N5ChunkReader.processBytes
  • parseMinishardIndex
  • BinaryDataService.convertIfNecessary
  • UploadService.addLayerAndResolutionDirIfMissing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant