Re: Cannot catch _mysql_exceptions.OperationalError

2008-01-18 Thread Jeffrey Froman
Bob wrote: Here's the code that did not work: import _mysql_exceptions from _mysql_exceptions import OperationalError try: database_code() except (_mysql_exceptions.OperationalError, OperationalError), e: error_handling() Both of the above forms work fine here, as does using

Cannot catch _mysql_exceptions.OperationalError

2008-01-17 Thread Bob
In our database code (we are using django v0.96) we wanted to catch and handle MySQL OperationalErrors. We use both the Django models and database connections. However, even though we confirmed that a _mysql_exceptions.OperationalError are raised (particularly 1213 deadlock), we cannot catch

Re: Cannot catch _mysql_exceptions.OperationalError

2008-01-17 Thread John Nagle
Bob wrote: In our database code (we are using django v0.96) we wanted to catch and handle MySQL OperationalErrors. We use both the Django models and database connections. However, even though we confirmed that a _mysql_exceptions.OperationalError are raised (particularly 1213 deadlock),