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

[Issue/Refactor] io::Errors are hard to trace #394

Open
mrcjkb opened this issue Feb 4, 2025 · 2 comments
Open

[Issue/Refactor] io::Errors are hard to trace #394

mrcjkb opened this issue Feb 4, 2025 · 2 comments
Assignees
Labels

Comments

@mrcjkb
Copy link
Member

mrcjkb commented Feb 4, 2025

We have quite a few error enum variants like this one:

    #[error(transparent)]
    Io(#[from] io::Error),

This results in vague error messages like no such file or directory without any details about what action failed.

We should make all our functions that can return io::Error return their own type, with an appropriate error message.

@mrcjkb mrcjkb added the refactor label Feb 4, 2025
@mrcjkb mrcjkb self-assigned this Feb 4, 2025
@vhyrro
Copy link
Contributor

vhyrro commented Feb 4, 2025

we should return io::Errors but with an error message, which would greatly improve the UX, for sure.
I don't think we need a wrapper type, as our error already is the wrapper type :p

@mrcjkb
Copy link
Member Author

mrcjkb commented Feb 4, 2025

Sure, if we can wrap io::Errors with io::Errors, that's fine by me.

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

No branches or pull requests

2 participants