durusmail: quixote-users: ERROR_HANDLER in config.py
ERROR_HANDLER in config.py
2002-04-25
2002-04-25
2002-04-25
ERROR_HANDLER in config.py
Titus Brown
2002-04-25
-> > Is this used for anything anywhere?  I don't spot anything
-> > straightforward...
->
-> It doesn't look like it.  Error handling on Quixote is still a bit
-> krufty.  Applications should be able to override the formatting of error
-> pages (e.g. 404 errors).  I've been meaning to clean that part of
-> Quixote up for a while now but haven't got to it yet.  My current plan
-> is to change the publisher to look up the error handler using getattr on
-> namespace (e.g. getattr(object, "_q_except")).  You could then define
-> function that formats error pages like:
->
->     def _q_except(exception):
->         
->
-> The publisher would traverse up the path looking for the nearest
-> handler, much like exception handling.  If none can be found then a
-> default handler is used.

Sound Quixote-ish!

Incidentally, while we're on the topic of error handling, the default error
mailing (calling /usr/lib/sendmail) cannot be safely used from inside a
threaded program.  It might be nice to provide a standard option to
specify a mail server & then switch to using smtplib.

cheers,
--titus, who is quite cheerfully using Quixote from inside a threaded
        server.

p.s. Does anyone know if Apache 2.0 will execute under Linux in threaded mode?
If so, these might be concerns for people importing Quixote into mod_python...


reply