dabo Commit
Revision 3955
Date: 2008-03-16 15:57:46 -0700 (Sun, 16 Mar 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3955
Changed:
U trunk/ide/ClassDesigner.py
Log:
Wrapped the code to run the design in a try/except block, so that any errors
that prevent the design from being run will be caught and reported. Previously
such an error would cause a traceback, and the Designer would no longer
function properly.
I'd still like to be able to parse the exception and automatically move to that
method and the offending line, but since it is happening in a compile() call,
that information is not available for direct inspection. Any ideas on this
would be welcome!
Diff:
Modified: trunk/ide/ClassDesigner.py
===================================================================
--- trunk/ide/ClassDesigner.py 2008-03-13 20:46:29 UTC (rev 3954)
+++ trunk/ide/ClassDesigner.py 2008-03-16 22:57:46 UTC (rev 3955)
@@ -1667,7 +1667,11 @@
def onRunDesign(self, evt):
self.flushCodeEditor()
- self.CurrentForm.onRunDesign(evt)
+ try:
+ self.CurrentForm.onRunDesign(evt)
+ except StandardError, e:
+ dabo.ui.stop(_("Compilation Error: %s\nCode: %s") %
(e.msg, e.text.strip()),
+ _("Compilation Error"))
def onOpenDesign(self, evt):
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]