--- pages.ptl-orig	2004-07-27 11:52:02.263389096 +0200
+++ pages.ptl	2004-07-27 11:52:36.620166072 +0200
@@ -58,6 +58,13 @@
     """ % vars()
 
 def _q_exception_handler [html] (request, exc):
+    import sys
+    import traceback
+    import cStringIO
+    (exc_type, exc_value, tb) = sys.exc_info()
+    error_file = cStringIO.StringIO()
+    traceback.print_exception(exc_type, exc_value, tb, file=error_file)
+    err=error_file.getvalue()
     """
     <html>
     <head><title>Quixote Demo</title></head>
@@ -68,10 +75,12 @@
     can do whatever it likes to provide a friendly page.
     </p>
     <p>Here's the exception that was raised:<br />
-    <code>%s (%s)</code>.</p>
+    <code>%s (%s)
+     %s
+    </code>.</p>
     </body>
     </html>
-    """ % (repr(exc), str(exc))
+    """ % (repr(exc), str(exc), err)
 
 def dumpreq [html] (request):
     """
