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

doc(examples): add examples with custom error handling #304

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flosse
Copy link

@flosse flosse commented Nov 30, 2015

No description provided.

@flosse flosse mentioned this pull request Nov 30, 2015

fn foo_handler<'a, D>(_: &mut Request<D>, mut res: Response<'a,D>) -> MiddlewareResult<'a, D> {

let x: AppResult<String> = (||Ok({
Copy link
Author

Choose a reason for hiding this comment

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

This is actually a hack that I really like to be simplified

@Ryman
Copy link
Member

Ryman commented Nov 30, 2015

Thanks for taking initiative on this!

I've been delaying a bit on this as I think it requires a minor breaking change to get working properly due to coherence. I'd like to get our current behavior a bit more fleshed out (with the help of #299) so that I can know the real impact of the changes.

I've amended your branch here with an example of how it could work: master...Ryman:flosse-error-handling

@flosse
Copy link
Author

flosse commented Dec 2, 2015

I've amended your branch here with an example of how it could work

Thanks a lot!
Do you also have a working example that is compatible with a stable nickel version? Or any recommendations?
At the moment it seems to me that rusty people just don't care about errors and really like the unwrap() method ;-)

@homu
Copy link
Contributor

homu commented Mar 13, 2016

☔ The latest upstream changes (presumably 1964b16) made this pull request unmergeable. Please resolve the merge conflicts.

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.

3 participants