summaryrefslogtreecommitdiff
path: root/paste/evalexception
diff options
context:
space:
mode:
authorianb <devnull@localhost>2006-10-20 19:05:40 +0000
committerianb <devnull@localhost>2006-10-20 19:05:40 +0000
commite4815ce24daa232d588d588490b214b079890451 (patch)
tree0a9c47646725922c9b48c9db15fd1ea9bc7b90a2 /paste/evalexception
parent342e1dba47ffba616b0b578a70412a867c6d89a7 (diff)
downloadpaste-e4815ce24daa232d588d588490b214b079890451.tar.gz
Moved evalexception entry point
Diffstat (limited to 'paste/evalexception')
-rw-r--r--paste/evalexception/middleware.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/paste/evalexception/middleware.py b/paste/evalexception/middleware.py
index 99228b1..04327d8 100644
--- a/paste/evalexception/middleware.py
+++ b/paste/evalexception/middleware.py
@@ -572,3 +572,21 @@ error_template = '''
</body>
</html>
'''
+
+def make_eval_exception(app, global_conf, xmlhttp_key=None):
+ """
+ Wraps the application in an interactive debugger.
+
+ This debugger is a major security hole, and should only be
+ used during development.
+
+ xmlhttp_key is a string that, if present in QUERY_STRING,
+ indicates that the request is an XMLHttp request, and the
+ Javascript/interactive debugger should not be returned. (If you
+ try to put the debugger somewhere with innerHTML, you will often
+ crash the browser)
+ """
+ if xmlhttp_key is None:
+ xmlhttp_key = global_conf.get('xmlhttp_key', '_')
+ return EvalException(app, xmlhttp_key=xmlhttp_key)
+