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

Consider exporting common errors thrown by this crate #60

Closed
jannisbecker opened this issue Apr 18, 2021 · 3 comments · Fixed by #95
Closed

Consider exporting common errors thrown by this crate #60

jannisbecker opened this issue Apr 18, 2021 · 3 comments · Fixed by #95
Assignees
Labels
C-enhancement Category: enhancement

Comments

@jannisbecker
Copy link

jannisbecker commented Apr 18, 2021

Some returned Results returned by scraper functions use error types from the cssparser crate.
Unfortunately in my project, I cannot handle them (e.g. using thiserror) without adding cssparser to my dependencies as well, even though I don't need it anywhere else.

Please consider reexporting cssparser, or alternatively define error types for the scraper crate and export those.

Let's define a common error struct for scraper so that crates using it can integrate it in their error handling.

@mainrs
Copy link
Contributor

mainrs commented Apr 18, 2021

The better approach would probably be to define error types in scraper itself and export those.

@jannisbecker
Copy link
Author

Sounds good, yeah. It solves the same issue, so feel free to see this as the solution of this ticket.

@jannisbecker jannisbecker changed the title Consider reexporting crates of which errors are returned Consider exporting common errors thrown by this crate Apr 19, 2021
@cfvescovo cfvescovo added this to the 0.13.0 milestone Nov 15, 2021
@cfvescovo cfvescovo added the C-enhancement Category: enhancement label Jan 6, 2022
@cfvescovo cfvescovo self-assigned this Jan 7, 2022
@cfvescovo
Copy link
Collaborator

This is now being addressed in PR #95.
Thanks to @kiwifruit

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

Successfully merging a pull request may close this issue.

3 participants