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

Use thiserror instead of anyhow for error handling #15

Closed
ariel-miculas opened this issue Sep 13, 2024 · 1 comment · Fixed by #16
Closed

Use thiserror instead of anyhow for error handling #15

ariel-miculas opened this issue Sep 13, 2024 · 1 comment · Fixed by #16

Comments

@ariel-miculas
Copy link
Collaborator

thiserror is often used in libraries, whereas anyhow is usually used in applications. My use case is that I want to convert from errors returned by this library into errors that PuzzleFS uses, see: https://github.com/project-machine/puzzlefs/blob/master/puzzlefs-lib/src/format/error.rs

cgwalters added a commit that referenced this issue Sep 13, 2024
It was requested that we use `thiserror` as we're a library.

I dropped the `read_manifest` API as I don't think people
should use it in general and it would have required its
own dedicated error type.

Closes: #15
Signed-off-by: Colin Walters <walters@verbum.org>
cgwalters added a commit that referenced this issue Sep 13, 2024
It was requested that we use `thiserror` as we're a library.

I dropped the `read_manifest` API as I don't think people
should use it in general and it would have required its
own dedicated error type.

Closes: #15
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters
Copy link
Collaborator

PR in #16

cgwalters added a commit that referenced this issue Sep 13, 2024
It was requested that we use `thiserror` as we're a library.

I dropped the `read_manifest` API as I don't think people
should use it in general and it would have required its
own dedicated error type.

Closes: #15
Signed-off-by: Colin Walters <walters@verbum.org>
cgwalters added a commit that referenced this issue Sep 13, 2024
It was requested that we use `thiserror` as we're a library.

I dropped the `read_manifest` API as I don't think people
should use it in general and it would have required its
own dedicated error type.

Closes: #15
Signed-off-by: Colin Walters <walters@verbum.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants