[cx-oracle-users] Is it possible to get an error number from a cx_Oracle.Exception object?
Brought to you by:
atuining
From: Moore, P. <Pau...@at...> - 2004-01-21 16:06:00
|
I want to trap a particular Oracle error (904, invalid column name). At the moment, I'm doing that by except cx_Oracle.DatabaseError, e: if str(e).startswith("ORA-00904"): # handle this error While I can't imagine that the string format of the error will ever change enough to make this invalid, I'd prefer to check the error number directly. But I can't see a way of getting that number. Am I missing it, or is this not possible? Thanks, Paul. |