[Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFCore -
FSMetadata.py:1.5
Florent Guillaume
fg@nuxeo.com
23 Jun 2003 20:18:09 +0200
On Mon, 2003-06-23 at 19:37, Tres Seaver wrote:
> On Mon, 2003-06-23 at 13:08, Andy McKay wrote:
> > > I'd try to recreate it if I knew the specifics of the errors you
> > > encountered. As it is, I'll mark on my todo list to try and revisit
> > > this. I hate bare excepts.
> >
> > There's a lot of them in Zope code to hate :) I'll try to recreate and
> > track down the *real* problem now I have slightly more time.
>
> Bare excepts in Zope are particularly nasty, because they swallow
> ConflictErrors; in any currently-released Zope, such ill-mannered
> behavior can lead to transactions which commit using inconsistent data.
>
> I would vote for disabling 'except:' altogether in TTW code, and would
> make 'ConflictError' and all its bases inaccessible from TTW code as
> well (there is *no way* TTW code can know enough to do the Right Thing
> in the face of a conflict error; most filesystem code can't either, but
> we "trust" those authors :( ).
Except for TTW code that wishes to do:
try:
somestuff()
except ConflictError:
raise
except:
raise ValueError("check your values bob")
But that's still quite bad.
> For even more bonus points, we could remove Exception as a base class
> for the POSErrors (make a pool first on how many new bugs we inject).
>
> Tres.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com