[Zope] adding properties trough pythonscript
pw_lists at slinkp.com
pw_lists at slinkp.com
Sun Oct 17 00:31:37 EDT 2004
> 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.
More information about the Zope
mailing list