17 Oct
2004
17 Oct
'04
4:31 a.m.
On Fri, 2004-10-15 at 19:32 +0200, Dieter Maurer wrote:
... try: context.manage_addProperty('prop', 0, 'boolean') print "prop added<br>" except: print "adding prop to",str(obj.id),"failed<br>"
Do not use "try: ... except:...". It is dangerous. It can easily lead to ZODB inconsistencies...
not exactly good news to me....
can you point out some document explaining this?
mailing list archives? in general, don't use bare excepts; catch specific errors instead. Or, you can use a bare except IF you re-raise it; this is handy if you want to do some special logging or some such.
can I raise exceptions from a python script?
sure.