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

2 participants
@plaflamme
Contributor

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.

FIX: issue #182, let controller's error handler handle its own errors.
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

Merge pull request #188 from plaflamme/fix-error-handlers
FIX: issue #182, let controller's error handler handle its own errors.

@capotej capotej merged commit d73cbbf into twitter:master Jan 7, 2015

@capotej

This comment has been minimized.

Contributor

capotej commented Jan 7, 2015

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

@plaflamme

This comment has been minimized.

Contributor

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

Merge pull request #188 from plaflamme/fix-error-handlers
FIX: issue #182, let controller's error handler handle its own errors.

cacoco pushed a commit that referenced this pull request May 14, 2015

Merge pull request #188 from plaflamme/fix-error-handlers
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