[Zope-DB] catching sql method exceptions inside python scripts

Chris Withers lists at simplistix.co.uk
Mon Apr 5 06:16:31 EDT 2004


Jim Abramson wrote:

> (2.6.1)
> Module Shared.DC.ZRDB.DA, line 399, in __call__
> 
> 399:        try: DB__=dbc()
> 400:        except: raise 'Database Error', (
> 401:            '%s is not connected to a database' % self.id)

Sorry, to be clear, this is no longer a string exception in Zope 2.7.0, but 
masking the real problem by re-raising a different exception is still WRONG.

*grinz*

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk




More information about the Zope-DB mailing list