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

Chris Withers lists at simplistix.co.uk
Fri Apr 2 03:33:30 EST 2004


Jim Abramson wrote:

> It seems that
> 
> try:
>    mySqlMethod()
> except:
>    # handle the error...
> 
> is useless in python scripts...Zope springs up an error page anyway.  

That's suprising, what's the error that springs up?

> Anyone else found this to be the case?  Is this by design?  

No, but bare try/except's like that will bite you on the ass in so many new and 
unpleasant ways, I really would recommend against them!

cheers,

Chris

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




More information about the Zope-DB mailing list