Skip to content

Commit

Permalink
- documentation updates and a test polish
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed May 2, 2019
1 parent 8876587 commit 15dabec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 3 additions & 1 deletion CHANGES.rst
Expand Up @@ -54,7 +54,9 @@ Features
Other changes
+++++++++++++

- Exceptions during publishing are now re-raised in a new exceptions debug mode
- Exceptions during publishing are now re-raised in a new exceptions debug
mode to allow WSGI middleware to handle/debug it. See the `documentation
<https://zope.readthedocs.io/en/latest/wsgi.html#werkzeug>`_ for examples.
(`#562 <https://github.com/zopefoundation/Zope/issues/562>`_)

- Remove hardcoded list of factories that don't want an add dialog
Expand Down
2 changes: 1 addition & 1 deletion docs/wsgi.rst
Expand Up @@ -251,7 +251,7 @@ This is how you run Zope in exceptions debug mode using the built-in

.. code-block:: console
$ bin/runwsgi -ev etc/zope.ini
$ bin/runwsgi -e etc/zope.ini
If you built your environment using ``plone.recipe.zope2instance`` you will
need to do a manual change to your Zope configuration file. Enable exceptions
Expand Down
15 changes: 8 additions & 7 deletions src/ZPublisher/tests/test_WSGIPublisher.py
Expand Up @@ -652,13 +652,14 @@ def response_factory(stdout, stderr):
response.debug_exceptions = True
return response

# With debug_exceptions, the exception view is not called.
with self.assertRaises(BadRequest):
self._callFUT(environ, start_response, _publish,
_response_factory=response_factory)

# Clean up view registration
unregisterExceptionView(IException)
try:
# With debug_exceptions, the exception view is not called.
with self.assertRaises(BadRequest):
self._callFUT(environ, start_response, _publish,
_response_factory=response_factory)
finally:
# Clean up view registration
unregisterExceptionView(IException)


class ExcViewCreatedTests(ZopeTestCase):
Expand Down

0 comments on commit 15dabec

Please sign in to comment.