diff options
author | ianb <devnull@localhost> | 2006-02-22 18:51:35 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2006-02-22 18:51:35 +0000 |
commit | 29dda90805f7eb854bf0b9557a3d6f300e41fad3 (patch) | |
tree | b2504c9fdd1eee8ffc0157aad5491ac7081b06a5 /paste/evalexception | |
parent | b6ef4438942e31328c27bd9a9ddee6a3ba7fc29b (diff) | |
download | paste-29dda90805f7eb854bf0b9557a3d6f300e41fad3.tar.gz |
Add the textarea text version of the traceback to a collapsed version of the exception (it was already in the normal exception, but not in evalexception
Diffstat (limited to 'paste/evalexception')
-rw-r--r-- | paste/evalexception/middleware.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/paste/evalexception/middleware.py b/paste/evalexception/middleware.py index df0d302..302a84a 100644 --- a/paste/evalexception/middleware.py +++ b/paste/evalexception/middleware.py @@ -448,6 +448,7 @@ def format_eval_html(exc_data, base_path, counter): show_hidden_frames=True, show_extra_data=False, include_reusable=False).format_collected_data(exc_data) + text_er = formatter.format_text(exc_data, show_hidden_frames=True) return """ %s <br> @@ -457,7 +458,14 @@ def format_eval_html(exc_data, base_path, counter): <div id="full_traceback" class="hidden-data"> %s </div> - """ % (short_er, long_er) + <br> + <script type="text/javascript"> + show_button('text_version', 'text version') + </script> + <div id="text_version" class="hidden-data"> + <textarea style="width: 100%%" rows=10 cols=60>%s</textarea> + </div> + """ % (short_er, long_er, cgi.escape(text_er)) def make_repost_button(environ): url = request.construct_url(environ) |