dabo Commit
Revision 2981
Date: 2007-03-25 13:37:20 -0700 (Sun, 25 Mar 2007)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/2981

Changed:
U   trunk/dabo/ui/dDataControlMixinBase.py

Log:
Improved the information given in the log when a data binding fails.


Diff:
Modified: trunk/dabo/ui/dDataControlMixinBase.py
===================================================================
--- trunk/dabo/ui/dDataControlMixinBase.py      2007-03-25 18:38:23 UTC (rev 
2980)
+++ trunk/dabo/ui/dDataControlMixinBase.py      2007-03-25 20:37:20 UTC (rev 
2981)
@@ -206,18 +206,18 @@
                                                if isinstance(src, basestring):
                                                        try:
                                                                exec ("src.%s = 
curVal" % self.DataField)
-                                                       except:
-                                                               
dabo.errorLog.write("Could not bind to '%s.%s'" % (self.DataSource, 
self.DataField) )
+                                                       except StandardError, e:
+                                                               
dabo.errorLog.write("Could not bind to '%s.%s'\nReason: %s" % (self.DataSource, 
self.DataField, e) )
                                                else:
                                                        # The source is a 
direct object reference
                                                        try:
                                                                
src.__setattr__(self.DataField, curVal)
-                                                       except:
+                                                       except StandardError, e:
                                                                if 
hasattr(self.DataSource, "_name"):
                                                                        nm = 
self.DataSource._name
                                                                else:
                                                                        nm = 
str(self.DataSource)
-                                                               
dabo.errorLog.write("Could not bind to '%s.%s'" % (nm, self.DataField) )
+                                                               
dabo.errorLog.write("Could not bind to '%s.%s'\nReason: %s" % (nm, 
self.DataField, e) )
                                self._oldVal = curVal
                        self._afterValueChanged(_from_flushValue=True)
                return ret




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to