[cx-oracle-users] best way to get oracle error number from exception?
Brought to you by:
atuining
From: Mark H. <mh...@pi...> - 2005-10-24 21:25:55
|
Right now I'm doing this, which works but seems a bit fragile. Is there a better way to do this? try: conn = cx_Oracle.connect(user, passwd, connurl) except cx_Oracle.DatabaseError, e: oranum=str(e).split(':')[0] print 'oranum=/%s/'%(oranum) oranum=/ORA-01017/ Many TIA! Mark -- Mark Harrison Pixar Animation Studios |