[Zope3-dev] NotFound vs NotFoundError

Jim Fulton jim at zope.com
Wed Oct 20 19:02:00 EDT 2004


Early in the development of Zope 3, I created two exceptions:

   zope.exceptions.NotFoundError and
   zope.publisher.interfaces.NotFound.

The later is for reporting that a published object (an object
named by a URL or some other publishing name) could not be found.
This corresponds to HTTP Not Found errors.

I don't know what I was thinking for NotFoundError. Does anyone else
remember? ;)

These two exceptions are commonly confused. This is illustrated by
http://collector.zope.org/Zope3-dev/284.  The view for NotFoundError
should have been registered for NotFound.

I'd like to get rid of NotFoundError.  I propose to deprecate it,
replacing uses of it with (The standard Python exception) LookupError.

I also propose to change registration of the NotFound error view
to be for NotFound (rather than the depreicated notFoundError).

I don't think we need to rename NotFound.

Thoughts?

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list