Ian Bicking <[EMAIL PROTECTED]> writes:

>> 1) how do you disable them?
>
> Don't set the email address in your configuration.

Can you enlighten me on how paste discovers the email?  The default
Pylons config has the email addr in `email_to`.  I don't want the
error mails but I still want mails so I removed `email_to` and added
`webmaster_email` in my .ini.  Now the error mails are sent to the
webmaster.

Is this an accidental feature?

>> 2) how do you send them without unwinding the stack?
>
> You have to hook into what errormiddleware calls, 
> paste.exceptions.errormiddleware.handle_exception.  It would be nice if 
> there was something in the environment that was hooked into the 
> configuration, but there isn't now, so you'll have to provide all the 
> many arguments to that function.

I read:

  handle_exception(exc_info, 
                   error_stream, 
                   html=True, 
                   debug_mode=False, 
                   error_email=None, 
                   error_log=None, 
                   show_exceptions_in_wsgi_errors=False, 
                   error_email_from='[EMAIL PROTECTED]', 
                   smtp_server='localhost', 
                   error_subject_prefix='', 
                   error_message=None, 
                   simple_html_error=False)

I think I'll just log `str(exception)` for now.

 :-)

-- 
Yannick Gingras

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to