summaryrefslogtreecommitdiff
path: root/paste/exceptions
diff options
context:
space:
mode:
authorianb <devnull@localhost>2008-07-30 17:43:39 +0000
committerianb <devnull@localhost>2008-07-30 17:43:39 +0000
commitc0ff7f4dba55d60bdea88efefd1b3b92f217d4f9 (patch)
treebf552e039d5962d6391a85d46ca20943b6311bba /paste/exceptions
parentc34aa6be3296e3e10a9ca8c25df94abfe4450c89 (diff)
downloadpaste-c0ff7f4dba55d60bdea88efefd1b3b92f217d4f9.tar.gz
fix docstring example
Diffstat (limited to 'paste/exceptions')
-rw-r--r--paste/exceptions/errormiddleware.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/paste/exceptions/errormiddleware.py b/paste/exceptions/errormiddleware.py
index 35bb804..cc0613e 100644
--- a/paste/exceptions/errormiddleware.py
+++ b/paste/exceptions/errormiddleware.py
@@ -336,16 +336,15 @@ def handle_exception(exc_info, error_stream, html=True,
Use like::
import sys
- import paste
- import paste.error_middleware
+ from paste.exceptions.errormiddleware import handle_exception
try:
do stuff
except:
- paste.error_middleware.exception_handler(
- sys.exc_info(), paste.CONFIG, sys.stderr, html=False)
+ handle_exception(
+ sys.exc_info(), sys.stderr, html=False, ...other config...)
If you want to report, but not fully catch the exception, call
- ``raise`` after ``exception_handler``, which (when given no argument)
+ ``raise`` after ``handle_exception``, which (when given no argument)
will reraise the exception.
"""
reported = False