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


- -------- Original Message --------
Subject: Re: [Zope-dev] SVN:
zope.server/branches/achapman-exc-info/src/zope/server/http/ further
compliance with WSGI PEP.
Date: Tue, 17 May 2011 18:34:14 -0400
From: Tres Seaver <tsea...@palladion.com>
To: Satchidanand Haridas <satc...@zope.com>

On 05/17/2011 06:12 PM, Satchidanand Haridas wrote:

>> The WSGI PEP doesn't specify any WSGI specific exceptions.
>
>> - The sample CGI example that the PEP provides  also raises an 
>> AssertionError for this scenario:
>
>>      http://www.python.org/dev/peps/pep-0333/#the-server-gateway-side
>
>> Also note that Paste's HTTP server (Paster) and CherryPy both raise 
>> AssertionErrors for this scenario:
>
>> - Paste: 
>> https://bitbucket.org/ianb/paste/src/4f5cfde87603/paste/httpserver.py#cl-166
>
>> - CherryPy: 
>> http://www.cherrypy.org/browser/trunk/py2/cherrypy/wsgiserver/__init__.py#L2050
>
>
>> Can you clarify what you meant by a WSGI-specific exception type?

I was thinking we would derive a custom exception type, e.g.:

  class WSGIException(Exception):
      pass

and then raise instances of it.  I didn't know that the other servers
were raising AssertionError, which still seems like the wrong thing to
raise at runtime in a production environment:  I guess we can follow
their lead in this case.


Tres.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3S/EAACgkQ+gerLs4ltQ6tPACgw3ZmjN6WheORNzh61fcafn05
CB0Anim/B6Ccaa4+KLCCyYn9IA7QdADE
=bjI7
-----END PGP SIGNATURE-----
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to