Hello:

On Tue, 20 Jun 2006, Tibor Simko wrote:
> I have chosen to simply pass Python DB API 2.0 exceptions along to
> the client code [...] Please cvs update and see the new API doc
> [...]

One precision raised in a discussion with Greg.  This does not mean
that you are now obliged to introduce exception handling into every
run_sql() call ASAP, especially WRT read-like operations.  

For example, for web requests, WebSession now filters out the problem
of OperationalError, so that your web code will not even be reached in
this situation.  Of course, WebSession cannot filter out a problem
that arrives in the middle of a longish web request, or when only some
tables become corrupt.

That said, you may want to start by introducing exception handling
especially into the write-like operations where you issue several
mutually-dependent SQL queries to reach the goal, simulating poor
man's transaction system.  (This will become much simpler when we
migrate to fancier MySQL versions and storage engines, now that
MySQLdb officially supports MySQL-5.0.)

Best regards
-- 
Tibor Simko ** CERN IT-UDS ** Bldg 31-S-014 ** Voice: +41-22-7673527
CERN Document Server ** <http://cds.cern.ch/> ** <[email protected]>

Reply via email to