[Zope-dev] Bare except and ConflictError in manage_beforeDelete

Chris McDonough chrism at plope.com
Fri Oct 31 10:14:00 EST 2003


+1 

On Fri, 2003-10-31 at 07:43, Leonardo Rochael Almeida wrote:
> 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




More information about the Zope-Dev mailing list