[Zope-dev] brain.getObject and traversal
Chris Withers
chris at simplistix.co.uk
Fri Apr 1 02:48:34 EST 2005
Florent Guillaume wrote:
> Well of course no, but I never had to check a getObject() against
> Unauthorized. Maybe it's because I only use it in a CMF setting where
> unaccessible objects are filtered anyway.
Maybe, but CMF isn't the only use of Zope ;-)
> OTOH you're a bit excessive in your "Whole array of possible distinct
> errors".
Not really. I want to know the difference between:
- unauthorized: my object has problems and probably needs its
permissions fixing
- not found: I want to know why an object is indexed that doesn't exist
and fix that
- other random error: damn, big problems with catalog, need to post to lists
In all three cases, knowing the type of error and getting a sensible
traceback in my logs is infinitely more useful than a random...
AttributeError: None has no attribute x
...error at some point in the future, which may be no-where near the
actual catalog search.
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope-Dev
mailing list