Skip to content

parser: add_schema_from_file: return InvalidFilePath instead of io::Error - #292

Merged
Bergmann89 merged 1 commit into
Bergmann89:masterfrom
wsipak:errors
Sep 13, 2026
Merged

Bergmann89 merged 1 commit into
Bergmann89:masterfrom
wsipak:errors

Conversation

@wsipak

@wsipak wsipak commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Follow-up to: #291

This is another case where the user would get an io::Error without any information about the path.
With this change, the Error provides the information about the path.

From what I see this was the only use of the implicit conversion from io::Error in

pub enum Error<E> {
/// An IO error occurred.
#[error("IO Error: {0}")]
IoError(#[from] IoError),

I think it's worth considering to drop the #[from] for implicit conversion completely, so that the users of this type must explicitly handle io::Error and produce an error with the path info.

…rror

This allows providing the information about the path wihtin the error.
@Bergmann89
Bergmann89 merged commit 96299a0 into Bergmann89:master Sep 13, 2026
2 checks passed
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 this pull request may close these issues.

2 participants