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

FIX: issue #182, let controller's error handler handle its own errors. #188

Merged
merged 1 commit into from Jan 7, 2015

Conversation

@plaflamme
Copy link
Contributor

@plaflamme plaflamme commented Jan 7, 2015

This is a partial fix for issue #182. It allows a controller's error handler to handle its own errors. It still uses the "last" registered handler as the global error handler. Fixing that would require API changes.

This is a partial fix for issue #182. It allows a controller's error handler to handle its own errors. It still uses the "last" registered handler as the global error handler. Fixing that would require API changes.
capotej added a commit that referenced this pull request Jan 7, 2015
FIX: issue #182, let controller's error handler handle its own errors.
@capotej capotej merged commit d73cbbf into twitter:master Jan 7, 2015
@capotej
Copy link
Contributor

@capotej capotej commented Jan 7, 2015

Thanks! Would love to get rid of that "last registered" errorHandler hack.

@plaflamme
Copy link
Contributor Author

@plaflamme plaflamme commented Jan 8, 2015

Yeah, I think that would require some API change though, specifically for the notFound handler (not sure it makes sense to have that on Controller)

I haven't looked at this in detail, but I'm thinking there could be an errorHandler on both Controller and FinatraServer and a notFound handler on FinatraServer. The errorHandler on FinatraServer would be invoked when the controller's handler isn't specified or doesn't handle the error. Would that make sense?

cacoco pushed a commit that referenced this pull request May 13, 2015
FIX: issue #182, let controller's error handler handle its own errors.
cacoco pushed a commit that referenced this pull request May 14, 2015
FIX: issue #182, let controller's error handler handle its own errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants