diff options
author | ianb <devnull@localhost> | 2008-07-30 17:43:39 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2008-07-30 17:43:39 +0000 |
commit | c0ff7f4dba55d60bdea88efefd1b3b92f217d4f9 (patch) | |
tree | bf552e039d5962d6391a85d46ca20943b6311bba /paste/exceptions | |
parent | c34aa6be3296e3e10a9ca8c25df94abfe4450c89 (diff) | |
download | paste-c0ff7f4dba55d60bdea88efefd1b3b92f217d4f9.tar.gz |
fix docstring example
Diffstat (limited to 'paste/exceptions')
-rw-r--r-- | paste/exceptions/errormiddleware.py | 9 |
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 |