[Zope-dev] Bare except and ConflictError in manage_beforeDelete

Leonardo Rochael Almeida leo at hiper.com.br
Fri Oct 31 07:43:37 EST 2003


On Fri, 2003-10-31 at 09:28, Florent Guillaume wrote:
> [...] manage_beforeDelete has this code:
>              try:
>                  if hasattr(aq_base(object), 'manage_beforeDelete'):
>                      object.manage_beforeDelete(item, container)
>              except BeforeDeleteException, ob:
>                  raise
>              except:
>                  LOG('Zope',ERROR,'manage_beforeDelete() threw',
>                      error=sys.exc_info())
>                  pass
> Which means that ConflictErrors in my invariant code get swallowed [...]
> 
> I want to add an additionnal:
>              except ConflictError:
>                  raise

+1

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.




More information about the Zope-Dev mailing list