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:
- define own error mapper (the right way). @ http://wiki.pylonshq.com/display/pylonsdocs/error+documents code sample.
- send out email in
error.pycontroller's 'document' method (fast hacky way).
Comments
Post a Comment