Skip to content

provide FileResolverError with filename information - #291

Merged
Bergmann89 merged 1 commit into
Bergmann89:masterfrom
wsipak:filename-errors
Sep 6, 2026
Merged

provide FileResolverError with filename information#291
Bergmann89 merged 1 commit into
Bergmann89:masterfrom
wsipak:filename-errors

Conversation

@wsipak

@wsipak wsipak commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

This adds filename information to errors returned by FileResolver.

The current error type is not helpful when files are included recursively. The current error message is:

Error: ParserError(Resolver(No such file or directory (os error 2)))

This PR introduces FileResolverError, which includes the path of the file that caused the error:

Error: ParserError(Resolver(IO Error: No such file or directory (os error 2) (path: /foo/bar/xsdcheck/gml.xsd)))

This introduces a new `FileResolverError` type that wraps `io:Error`
and includes the `PathBuf` of the file that caused the error.
@Bergmann89
Bergmann89 merged commit 76b9cf8 into Bergmann89:master Sep 6, 2026
2 checks passed
@Bergmann89

Copy link
Copy Markdown
Owner

@wsipak Thanks for the contribution. Merged 👍

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