[Zope-CMF] standard_error_message/404 nightmares (Re: 1.3 roadmap)

Chris Withers chrisw@nipltd.com
Thu, 28 Mar 2002 11:17:21 +0000


Lalo Martins wrote:
> 
> > Gimme some examples, 'cos I don't really believe you ;-)
> 
> Easy. Go to plone.org or cmf.zope.org, log in, then bring up 404.

I suspect cmf.zope.rog is badly set up and I don't haeva login for plone.org. What's the
poibnt you're trying to make?

> > > - it always renders as Anonymous, for example.
> >
> > Hmmm... that kinda makes sense though, if something barfs, do you really want to
> > be logged in?
> 
> Yes.
> 
> First, for consistence.

*shrugs* Errors are never consistent...

> Second, my use case is a wiki-like setup, where the 404 page
> offers a list of types to create if the user has the right
> permissions. Of course, that doesn't work if request isn't right.

So why not just have your standard_error_messsage redirect to another page if the error is
a 404 where the user can add these types?

> > I find this a little strange though, maybe a ZC head could give a
> > reason/explanation...
> 
> If they could do this, I'd be glad to pursue the proper fix
> instead of my lame workaround.

Indeed

> > > Actually, Zope2 error handling is way broken and I don't think
> > > I'm the man to fix it.
> >
> > I don't really agree with that.
> 
> Well, it is. Use 'grep -r standard_error_message lib/python' and
> you'll see it get called from all sorts of places with all sorts
> of contexts (or none whatsoever).

Urm, what did you expect?! I think you ask to much of error handling, especially given
your usecase is quite easily solved without all this hassle...

cheers,

Chris