dabo Commit
Revision 5608
Date: 2010-01-29 14:11:18 -0800 (Fri, 29 Jan 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5608
Changed:
U trunk/dabo/db/dCursorMixin.py
Log:
At one time in Dabo's life, having the SQL as part of the error message
displayed
to the user may have made sense, but now I'm running into real trouble with it:
My SQL statements can be huge (100+ lines) and on at least one platform (Mac)
the
dialog displayed gets sized below the screen, and the Okay button can't be
exposed.
Also, we now have dbActivityLog, where we can log such errors along with the
SQL.
In general, the user that will see the message only cares to see the actual
error
message (maybe not even that) but will be confused with all the noise of the SQL
statement.
So, I've removed the SQL from the dbQueryException raised from execute(), and
added the SQL and error to the dbActivityLog.
We should also look into the dialog size problem on at least Mac, as a separate
issue.
Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py 2010-01-29 00:21:42 UTC (rev 5607)
+++ trunk/dabo/db/dCursorMixin.py 2010-01-29 22:11:18 UTC (rev 5608)
@@ -336,7 +336,9 @@
elif "access" in errMsg.lower():
raise dException.DBNoAccessException(errMsg)
else:
- raise dException.DBQueryException(errMsg, sql)
+ dabo.dbActivityLog.write(
+ _("DBQueryException encountered
in execute(): %s\n%s") % (errMsg, sql))
+ raise dException.DBQueryException(errMsg)
# Some backend programs do odd things to the description
# This allows each backend to handle these quirks individually.
_______________________________________________
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/[email protected]