Have Pylons abort function send exception emails on errors -


i want able use abort function pylons.controllers.util display 404, 500 error pages info on went wrong, @ same time make abort function send me exception emails errormiddleware.

right now, i've got this:

try:     do(this) except:     abort(500, 'something went wrong!') 

this displays page 500 header , message, nice. want, standard exception e-mails sent me, though i've returned 500 error myself.

is there way this? can somehow run errormiddleware function there? ideas appreciated.

pylons has error reporting email via error_email_from , email_to params in config .ini file.

for example:

[default] email_to = errore@mysite.com error_email_from = error_robot@mysite.com 

update: there 2 ways of doing want achieve:

  1. define own error mapper (the right way). @ http://wiki.pylonshq.com/display/pylonsdocs/error+documents code sample.
  2. send out email in error.py controller's 'document' method (fast hacky way).

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -