Hi all,
I'd like to log MySQL errors. If I do:
try: (command)
except MySQLdb.OperationalError, e: print e
I may get something like:
(1136, Column count doesn't match value count at row 1)
If I don't know in advance which error to expect, but on the contrary
want to
On Wed, Nov 16, 2011 at 8:57 AM, Frederic Rentsch
anthra.nor...@bluewin.ch wrote:
Hi all,
I'd like to log MySQL errors. If I do:
try: (command)
except MySQLdb.OperationalError, e: print e
I may get something like:
(1136, Column count doesn't match value count at row
On Wed, 2011-11-16 at 09:09 -0800, Chris Kaynor wrote:
On Wed, Nov 16, 2011 at 8:57 AM, Frederic Rentsch
anthra.nor...@bluewin.ch wrote:
Hi all,
I'd like to log MySQL errors. If I do:
try: (command)
except MySQLdb.OperationalError, e: print e
I may get something
Am 16.11.2011 19:39, schrieb Frederic Rentsch:
pyimport sys
pytry:
py raise RuntimeError
py except:
py print sys.exc_info()
py
(type 'exceptions.RuntimeError', RuntimeError(), traceback object
at 0x02371588)
Chris, Thanks very much! Great help!
How about using the excellent
On 16/11/2011 17:09, Chris Kaynor wrote:
On Wed, Nov 16, 2011 at 8:57 AM, Frederic Rentsch
anthra.nor...@bluewin.ch wrote:
Hi all,
I'd like to log MySQL errors. If I do:
try: (command)
except MySQLdb.OperationalError, e: print e
I may get something like:
(1136,
On 11/16/2011 11:57 AM, Frederic Rentsch wrote:
If I don't know in advance which error to expect, but on the contrary
want to find out which error occurred, I can catch any error by omitting
the name:
except: (handle)
But now I don't have access to the error message 'e'. I'm sure
On Wed, 16 Nov 2011 17:57:27 +0100, Frederic Rentsch wrote:
I'd like to log MySQL errors. If I do:
try: (command)
except MySQLdb.OperationalError, e: print e
I may get something like:
(1136, Column count doesn't match value count at row 1)
If I don't know in