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

Make render functions work with any error #31

Closed
arctic-hen7 opened this issue Sep 28, 2021 · 1 comment · Fixed by #33
Closed

Make render functions work with any error #31

arctic-hen7 opened this issue Sep 28, 2021 · 1 comment · Fixed by #33
Assignees
Labels
A-templates Area: templates C-enhancement Category: enhancement D-medium Difficulty: medium P-medium Priority: medium S-in-development Status: in development
Milestone

Comments

@arctic-hen7
Copy link
Member

Is your feature request related to a problem? Please describe.
Right now, render functions like those for the build state strategy need to have String as the error type. That's not only annoying for any crate with its own errors, it encourages .unwrap()s where they're not safe (not mentioning any names all the examples!).

Describe the solution you'd like
Render functions should accept a Box<dyn std::error::Error> as a return type, and ErrorCause should be able to be defined as blaming the server automatically with ? if it's not explicitly specified.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
This would be a breaking change, and will be released in v0.3.0.

@arctic-hen7 arctic-hen7 added C-enhancement Category: enhancement A-templates Area: templates D-medium Difficulty: medium P-medium Priority: medium S-in-development Status: in development labels Sep 28, 2021
@arctic-hen7 arctic-hen7 self-assigned this Sep 28, 2021
@arctic-hen7 arctic-hen7 added this to the v0.3.0 milestone Sep 28, 2021
@arctic-hen7
Copy link
Member Author

I should have this finished by end of day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-templates Area: templates C-enhancement Category: enhancement D-medium Difficulty: medium P-medium Priority: medium S-in-development Status: in development
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant