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

Failure to refine a path-like to a given target type should be PathWrapperException, not simple TypeError #20

Closed
vreuter opened this issue Mar 13, 2024 · 0 comments · Fixed by #21
Assignees
Labels

Comments

@vreuter
Copy link
Contributor

vreuter commented Mar 13, 2024

Ideally, use sites will always construct exception handling clauses as narrowly as is merited to avoid inadvertently catching exceptions of which they're not really confident of the cause. Being as that's not likely the case, though, we should always be emitting PathWrapperException when a call to refine a Path or a string as one of the types in this library fails. Right now that's the case for refinement through from_string, but not directly through a constructor. This divergence between the code paths traveled for refinement is a further issue that should be solved.

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

Successfully merging a pull request may close this issue.

1 participant