[Commits] (alecf) fix bug 2550 - limit error alert dialog to 5 stack frames

commits at osafoundation.org commits at osafoundation.org
Tue Mar 1 13:15:03 PST 2005


Commit by: alecf
Modified files:
chandler/Chandler.py 1.63 1.64

Log message:
fix bug 2550 - limit error alert dialog to 5 stack frames

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/Chandler.py.diff?r1=text&tr1=1.63&r2=text&tr2=1.64

Index: chandler/Chandler.py
diff -u chandler/Chandler.py:1.63 chandler/Chandler.py:1.64
--- chandler/Chandler.py:1.63	Tue Mar  1 12:40:39 2005
+++ chandler/Chandler.py	Tue Mar  1 13:15:01 2005
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.63 $"
-__date__ = "$Date: 2005/03/01 20:40:39 $"
+__version__ = "$Revision: 1.64 $"
+__date__ = "$Date: 2005/03/01 21:15:01 $"
 __copyright__ = "Copyright (c) 2003-2005 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -174,9 +174,10 @@
             realMain()
         except Exception, exception:
             type, value, stack = sys.exc_info()
-            formattedBacktrace = "".join (traceback.format_exception (type, value, stack))
+            formattedBacktrace = "".join (traceback.format_exception (type, value, stack, 5))
 
-            message = "Chandler encountered an unexpected problem %s\n\n%s" % (message, formattedBacktrace)
+            message = ("Chandler encountered an unexpected problem %s\n" + \
+                      "Here are the bottom 5 frames of the stack:\n%s") % (message, formattedBacktrace)
             logging.exception(message)
             # @@@ 25Issue - Cannot create wxItems if the app failed to initialize
             dialog = wx.MessageDialog(None, message, "Chandler", wx.OK | wx.ICON_INFORMATION)



More information about the Commits mailing list