[mod_python] Grabbing the callback object

Conrad Steenberg conrad at hep.caltech.edu
Fri Nov 8 13:31:49 EST 2002


Hi Jaime

You can write your own error message to the client, and return
apache.DONE to stop Apache from any further processing.

E.g.

def handler(req):
  try:
    <Do some processing>
  except:
    <Write error message, including headers>
    return apache.DONE

  return apache.OK


Cheers!

Conrad

On Fri, 2002-11-08 at 12:16, Wyant, Jaime wrote:
> Hi all!
> 
> Is there any way to grab the Callback object?  I really want to override the
> "ReportError" method and generate a more meaningful error message with
> pretty graphics.
> 
> Better yet, is there a way to catch unhandled exceptions and display a
> custom error message? 
> 
> thanks!
> 
> jaime wyant (jwyant at sfbcic . com)
> MS Farm Bureau
> (601) 977 - 4291
> 
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
-- 
*-----------------------------------------*
| Conrad Steenberg                        |
| Caltech, Mail Code 356-48               |
| Pasadena, CA, 91125                     |
| e-mail: conrad at hep.caltech.edu          |
| Tel: (626) 395-8758                     |
*-----------------------------------------*




More information about the Mod_python mailing list