[DB-SIG] DCOracle - oci.error to access

Matthew T. Kromer matt@zope.com
2002年10月21日 10:02:51 -0400


Sunita Pawar wrote:
> Hi,
>> How do I look at the error that was returned in the try/except for 
> DCOracle
> I had tried
>> import DCOracle
> try:
> db = DCOracle.Connect(user/ 
> <mailto:user/password@sid>password@sid <mailto:user/password@sid>)
> except oci.error, e:
> print "Error", e
>> But it gives the error message:
> NameError: oci
>> Do I ahve to import some module to access oci? Even if I have to, how 
> do I access the what oci.error is?
>> Thanks
> Sunita

Try using
except DCOracle2.DatabaseError:
instead.
-- 
Matt Kromer
Zope Corporation http://www.zope.com/ 

AltStyle によって変換されたページ (->オリジナル) /