[Zope-CMF] Re: Bad interaction between CMF 1.4 and Zope 2.8
(catalog-getObject-raises)
Florent Guillaume
fg at nuxeo.com
Fri Apr 22 11:17:01 EDT 2005
Chris Withers <chris at simplistix.co.uk> wrote:
> > The None issue is a red herring, it's just that we *don't* want to fail
> > even if there are broken indexes. No we don't. We're reindexing what we
> > can find in the catalog. We don't want an exception.
>
> Yes we do! I really really really want to know if:
> - I have a catalog entry that points to an object that no longer exists.
> This can ONLY happen due to a bug somewhere and needs to be fixed
> - I have index corruption or other weirdness
> - any of the above are happening, and be able to descriminate between them.
>
> I honestly can thing of no sane justification for putting that None
> there. It's tantamount to a bare try except, and without even any logging.
Yes, logging should be there. I'll add a LOG at level WARNING somewhere,
I'm not sure where (after all it's unrestrictedTraverse that does the
catching).
> PLEASE provide some sane justification for this, 'cos I'm obviously
> missing something since you're a bright guy and can't seriously be
> advocating sweeping unspecified bugs under the carpet...
>
> > I don't want the users to find that out when they change the local roles
> > somewhere.
>
> When DO you want them to find out?
The users? Never. The site administrators, that's a different thing.
Logs should be fine, and in 2.8 they can choose to have exceptions
raised -- I'll test GETOBJECT_RAISES too.
[...]
> How so? Sidnei would never have seen the traceback if you had swallowed
> the problem by replacing getObject with unrestrictedTraverse(path,None),
> he would have had something else weird happen later down the line and
> have to try and track it back to this action going wrong...
Look, *I* didn't swallow the problem, it's been there forever. I'm
trying to fix things one by one. I agree that logging is necessary. OTOH
we have backward compatibility to deal with, and cannot just suddenly
randomly throw exceptions even if they're legitimate.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
More information about the Zope-CMF
mailing list