durusmail: quixote-users: TraversalError, not enough info?
TraversalError, not enough info?
2004-03-18
2004-03-23
2004-04-14
TraversalError, not enough info?
Evan LaForge
2004-04-14
> > Currently, my code snags TraversalError in x._q_exception_handler and
> > redirects to '..' and the client just keeps bouncing up until it hits an
> > object that does exist.  Multiple identical "doesn't exist" messages are
> > controlled with some light hackery.
> >
> > What I really want is a way to redirect directly to the deepest existing
> > object, and how I think I want to do that is for TraversalError to report m
> ore
> > precisely where the traversal failed.  This could be done if TraversalError
>
> Rather than changing Quixote, I should think it would be easy to handle
...

I got sidetracked by other problems and didn't deal with this a while, but
my eventual solution was to notice that Publisher.namespace_stack is
documented and has an accessor, so it must be ok for me to look at it.
>From there it's easy for an object to find its path by counting how far up
the namespace_stack it lies and pulling that many components off PATH_INFO.
I thought I'd mention it to the list since it's useful any time someone wants
to find their own path.

Thanks to all who replied :)


reply