summaryrefslogtreecommitdiff
path: root/paste/exceptions/errormiddleware.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2005-08-22 19:40:42 +0000
committerianb <devnull@localhost>2005-08-22 19:40:42 +0000
commite8b19ea9d27d4da0332cecd9af332f44384944f3 (patch)
tree6672e057cbd1b97cc7984ffc9016f05eb0b4d0c6 /paste/exceptions/errormiddleware.py
parent16c6ef405b64ac295ff3529e90c9b7fadaa0b9a1 (diff)
downloadpaste-e8b19ea9d27d4da0332cecd9af332f44384944f3.tar.gz
Got exception tests working; error_catcher filter now paste-deploy-ified
Diffstat (limited to 'paste/exceptions/errormiddleware.py')
-rw-r--r--paste/exceptions/errormiddleware.py23
1 files changed, 7 insertions, 16 deletions
diff --git a/paste/exceptions/errormiddleware.py b/paste/exceptions/errormiddleware.py
index 0f4541c..ad960fc 100644
--- a/paste/exceptions/errormiddleware.py
+++ b/paste/exceptions/errormiddleware.py
@@ -26,20 +26,10 @@ class ErrorMiddleware(object):
error_caching_wsgi_app = ErrorMiddleware(wsgi_app)
- These configuration keys are used:
-
- ``debug``:
- show the errors in the browser
- ``error_email``:
- if present, send errors to this email address
- ``error_log``:
- if present, write errors to this file
- ``show_exceptions_in_error_log``:
- if true (the default) then write errors to wsgi.errors
-
- By setting 'paste.throw_errors' to a true value, this middleware is
- disabled. This can be useful in a testing environment where you don't
- want errors to be caught and transformed.
+ By setting 'paste.throw_errors' in the request environment to a
+ true value, this middleware is disabled. This can be useful in a
+ testing environment where you don't want errors to be caught and
+ transformed.
"""
def __init__(self, application, global_conf,
@@ -136,7 +126,7 @@ class ErrorMiddleware(object):
error_email=self.error_email,
error_log=self.error_log,
show_exceptions_in_wsgi_errors=self.show_exceptions_in_wsgi_errors,
- error_email_from=self.error_email_from,
+ error_email_from=self.from_address,
smtp_server=self.smtp_server,
error_subject_prefix=self.error_subject_prefix,
error_message=self.error_message)
@@ -187,10 +177,11 @@ def handle_exception(exc_info, error_stream, html=True,
debug_mode=False,
error_email=None,
error_log=None,
- show_exceptions_in_wsgi_errors=False
+ show_exceptions_in_wsgi_errors=False,
error_email_from='errors@localhost',
smtp_server='localhost',
error_subject_prefix='',
+ error_message=None,
):
"""
You can also use exception handling outside of a web context,