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 DA.py, 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?)
Ask on [EMAIL PROTECTED]
-- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce