Oleg Broytmann пишет:
> On Sun, Oct 15, 2006 at 09:39:51PM +0700, Basil Shubin wrote:
>> _mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL 
>> server on '123' (101)"); used connection string: host=123, port=0, 
>> db=db, user=user, pwd=password
>>
>> Is the number '2003' is a mysql error code?
> 
>    It is.
> 
>> How I can catch the above error?
> 
>             except MySQLdb.OperationalError, e:
>                 if e.args[0] == 2003:

except MySQLdb.OperationalError, e:
        print e.args[0]

Gives the:

(2003, "Can't connect to MySQL server on '123' (101)"); used connection 
string: host=123, port=0, db=db, user=user, pwd=password

-- 
Basil Shubin
Freelance Software Developer


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to