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

irmin-pack: review resource/error management #1957

Open
samoht opened this issue Jul 5, 2022 · 0 comments
Open

irmin-pack: review resource/error management #1957

samoht opened this issue Jul 5, 2022 · 0 comments
Labels
area/backend About the backend feature/layered-store Related to the Layered Store type/refactor Code refactoring

Comments

@samoht
Copy link
Member

samoht commented Jul 5, 2022

Would be great to review resource management in case of errors (for instance, some file descriptors might not be properly closed in a few places).

More generally, in some place it's also a bit difficult to track what needs to be done with errors: some of them are just fatal (ie. the user cannot do anything with them anyway). As for the rest of the codebase, abstraction can help here: in case the exception is not useful, we could either just abstract it and expose a pp_error function - as logging it might be the only thing an user could do - or just raise an exception if really there's nothing useful to do anymore. An example of this is https://github.com/mirage/irmin/pull/1950/files/96acbcb0e13ba62e088b804bc36d230e886c4324#r913050362

@samoht samoht added type/refactor Code refactoring feature/layered-store Related to the Layered Store area/backend About the backend labels Jul 5, 2022
@samoht samoht mentioned this issue Jul 5, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend About the backend feature/layered-store Related to the Layered Store type/refactor Code refactoring
Projects
None yet
Development

No branches or pull requests

1 participant