Closed thehunmonkgroup closed 11 years ago
Hi thehunmongroup,
Thanks for the bug report. I've checked in a fix that I think addresses your issue on the 'handle-broken-context' branch. This includes a test for the error condition and is more explicit in the code about the condition being checked for. If you agree this addresses your issue, I will go ahead and merge.
Thanks, Chris
Hi Chris,
I've reviewed your fix, and it looks good to me.
Thanks for the quick turnaround time! Any idea when this will make it into an official release? Would be great to not deal with hand-patching the module during our development builds.
Chad
add_renderer_globals()
contains some logic that prevents runtime errors in the case where rendering is done from a script, but I found another case where more general error handling will benefit:In this case,
create_layout_manager()
is never called, butadd_renderer_globals()
is (because the debug toolbar is trying to return the runtime error via a request response, I think).This is a real pain during development, because the traceback displayed when a runtime error occurs during the building of the context is something like:
Not a terribly useful in this case. :)
The patch refactors the error handling in
add_renderer_globals()
in a more general manner, to support both the case of a missing request and a missing layout manager in the request.