From c0ff7f4dba55d60bdea88efefd1b3b92f217d4f9 Mon Sep 17 00:00:00 2001 From: ianb Date: Wed, 30 Jul 2008 17:43:39 +0000 Subject: fix docstring example --- paste/exceptions/errormiddleware.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'paste/exceptions') 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 -- cgit v1.2.1