Clemens Robbenhaar wrote:

 Hm, figuring out the "right" exception actually the problem; if the
data base connector would raise an exception of a certain type due to
unability to connect I could catch these and let the others pass.

Which DA are you using? It _should_ do that...

 Unfortunately I am not able to figure out the interesting ones so
quickly by experimenting, because I cannot think about (or even
reproduce) everything that may actually fail.

The specifc DA you are using should subclass all it's exceptions from a base exception. ZOracleDA does this the right wya, fro mwhat I've seen...

Unfortunately there is no sich general exception for it.

Well, it's up to the DA author to provide one...

(such as java
has as java.sql.SQLException ... often not very informative, but at least one
knows its from the data base.)
 Maybe the "DatabaseError" class could remain in the, so specific
data base connections could reuse this exception type?

Sounds like a plan, now you jus thave to persuade the DA authors to start using it ;-)

product to use this exception now? (btw: does somebody know, if Zope3
would maybe have such an "external data source connection" specific exception?)




Simplistix - Content Management, Zope & Python Consulting

Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - )

Reply via email to