Chris Withers <[EMAIL PROTECTED]> 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
> 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 Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests