[Zope-CVS] CVS: Products/ExternalEditor - zopeedit.py:1.35

Casey Duncan casey@zope.com
Thu, 8 Aug 2002 10:43:58 -0400


Update of /cvs-repository/Products/ExternalEditor
In directory cvs.zope.org:/tmp/cvs-serv23101

Modified Files:
	zopeedit.py 
Log Message:
Writes traceback to a temp file on fatal errors for better post mortem debugging


=== Products/ExternalEditor/zopeedit.py 1.34 => 1.35 ===
--- Products/ExternalEditor/zopeedit.py:1.34	Mon Jul 22 18:52:11 2002
+++ Products/ExternalEditor/zopeedit.py	Thu Aug  8 10:43:58 2002
@@ -636,6 +636,12 @@
     """Show error message and exit"""
     errorDialog('FATAL ERROR: %s' % message)
     traceback.print_exc(file=sys.stderr)
+    # Write out debug info to a temp file
+    debug_f = open(mktemp('-zopeedit-traceback.txt'), 'w')
+    try:
+        traceback.print_exc(file=debug_f)
+    finally:
+        debug_f.close()
     if exit: 
         sys.exit(0)