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

Print path when UnsupportedFormat error occurs #16

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

nithinmuthukumar
Copy link
Contributor

It's nice to see what file couldn't be parsed, so print it when the exception occurs

Copy link
Owner

@ysthakur ysthakur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! You're right, it's useful to know which file it failed on. Just one thing

src/parse_man/error.rs Outdated Show resolved Hide resolved
@nithinmuthukumar
Copy link
Contributor Author

nithinmuthukumar commented Mar 19, 2024

Seems like although PathBuf doesn't implement Display which was why i originally added debug formatting, thiserror is able to generate a Display for it.

Copy link
Owner

@ysthakur ysthakur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, didn't know thiserror was that smart. LGTM, then

Thanks again for the PR, I really appreciate it

@ysthakur ysthakur merged commit cac8ce8 into ysthakur:main Mar 19, 2024
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