Show More
@@ -277,13 +277,11 b' def includeme(config):' | |||||
277 | # how to handle a request. |
|
277 | # how to handle a request. | |
278 | config.add_notfound_view(pylons_app_with_error_handler) |
|
278 | config.add_notfound_view(pylons_app_with_error_handler) | |
279 |
|
279 | |||
280 | if settings.get('debugtoolbar.enabled', False): |
|
280 | if not settings.get('debugtoolbar.enabled', False): | |
281 | # if toolbar, then only http type exceptions get caught and rendered |
|
|||
282 | ExcClass = HTTPError |
|
|||
283 | else: |
|
|||
284 | # if no toolbar, then any exception gets caught and rendered |
|
281 | # if no toolbar, then any exception gets caught and rendered | |
285 | ExcClass = Exception |
|
282 | config.add_view(error_handler, context=Exception) | |
286 | config.add_view(error_handler, context=ExcClass) |
|
283 | ||
|
284 | config.add_view(error_handler, context=HTTPError) | |||
287 |
|
285 | |||
288 |
|
286 | |||
289 | def includeme_last(config): |
|
287 | def includeme_last(config): |
General Comments 0
You need to be logged in to leave comments.
Login now