Gregory (Grisha) Trubetskoy
grisha at modpython.org
Thu Feb 5 06:54:37 EST 2004
No, because it will result in an apache.HTTP_INTERNAL_SERVER_ERROR anyway. The only place where I see the publisher returns apache.HTTP_INTERNAL_SERVER_ERROR is when a function doesn't return anything, which is a different situation. Grisha On Tue, 13 Jan 2004, Paul wrote: > The cgihandler.py in mod_python 3.0.4 and earlier never seems > to return an HTTP 500 error (internal server error). Code > snippet from cgihandler.py: > > # this executes the module > imp.load_module(module_name, fd, path, desc) > > return apache.OK > > Shouldn't this be something like: > > # this executes the module > try: > imp.load_module(module_name, fd, path, desc) > except Exception, e: > if e.args and type(e.args[0]) == types.IntType: > return e.args[0] > else: > return apache.HTTP_INTERNAL_SERVER_ERROR > > return apache.OK > > publisher.py has something similar implemented. > > -- Paul > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|