[Zope-Coders] Changes to ZPublisher

Richard Jones richard at commonground.com.au
Wed Oct 6 21:23:56 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 7 Oct 2004 11:19 am, Donovan Baarda wrote:
> On Thu, 2004-10-07 at 11:13, Sidnei da Silva wrote:
> > On Thu, Oct 07, 2004 at 11:10:05AM +1000, Donovan Baarda wrote:
> > Returning None gives a 'object cannot be published because doesn't
> > have a docstring.' which is even worse.
>
> Hmm... didn't notice that... nasty.
>
> So what is the current way for a __bobo_traverse__ to indicate "object
> does not exist" and result in a 404?
>
> Perhaps AttributeError = 404 is a good idea after all...

No, as already mentioned, this will mask any application bugs that raise 
AttributeError.

NotFound exists for this purpose, doesn't it?


    Richard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBZJqsrGisBEHG6TARAl3LAJ93Dz9ifztxbrs6A4tFMYvwfAUrCwCfejbb
TYbvGBvxllomSNb3tngU5LI=
=kIw7
-----END PGP SIGNATURE-----


More information about the Zope-Coders mailing list