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

request.invoke exception view #2393

Merged
merged 19 commits into from
Mar 14, 2016
Merged

request.invoke exception view #2393

merged 19 commits into from
Mar 14, 2016

Conversation

mmerickel
Copy link
Member

Introduce a new API for invoking exception views manually. This can be done for several reasons but the primary use-case is for error handling inside of tweens where it is desirable to utilize the registered exception views of the pyramid app to render errors instead of defining some other hook for rendering the error as is required when using wsgi middleware.

@mmerickel mmerickel force-pushed the feature.invoke_exception_view branch from c3076fc to bc09250 Compare March 4, 2016 02:16
@digitalresistor
Copy link
Member

Much excitement =)

👍 from me. I just gave it a cursory glance though.

@mmerickel
Copy link
Member Author

Hey @tseaver I'm about to merge this, do you have any final objections?

@tseaver
Copy link
Member

tseaver commented Mar 9, 2016

I guess I'm -0 on checking anything in that leaves the traceback-local binding around until GC kicks in. Not enough to block it (and we may be doing it elsewhere), but it still makes me uncomfortable.

@mmerickel
Copy link
Member Author

AFAICT based on #2393 (comment) there should be no need for GC here as there are no circular refs. The only possible issue in this api is if a user themselves calls sys.exc_info() and passes it to me but at that point they're responsible for handling that - I can't stop them.

mmerickel added a commit that referenced this pull request Mar 14, 2016
@mmerickel mmerickel merged commit 375250d into master Mar 14, 2016
@mmerickel mmerickel deleted the feature.invoke_exception_view branch March 14, 2016 18:24
mmerickel added a commit that referenced this pull request Mar 14, 2016
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.

4 participants