Interesting idea. At work, we use log4j's SMTPAppender and hook it up to fatal alerts so you get the message and the exception emailed to you. It's reasonably helpful.
I assume you intend this to happen on certain types of exceptions that we couldn't recover from or didn't expect?
The traffic for this could be really high and hard to stop once it's out there, so I'd suggest a few things:
- clean up the exception handling so that stuff is caught/thrown at the right level (no throwing/catching generic Exception/Throwable unless it is the last resort). That way, as much recoverable errors can be taken care of.
- do like Maven 1 does and print an info/bug report message when the exception bubbles up to the stage we don't know what to do.
- default it to off. Give instructions in the above message of how to enable it for the next run. This is also wanted as you don't want to freak the users out.
Another trick: you'll need to provide an SMTP server for those that don't know one to use. On unix, localhost works even in a corporate environment if it is set up that way and the mail should make it out. On windows - no such luck. So you could have them point at codehaus' SMTP, but then you get firewall issues. So it needs to be configurable too.
I see this as being more helpful for the CI than general use.
Interesting idea. At work, we use log4j's SMTPAppender and hook it up to fatal alerts so you get the message and the exception emailed to you. It's reasonably helpful.
I assume you intend this to happen on certain types of exceptions that we couldn't recover from or didn't expect?
The traffic for this could be really high and hard to stop once it's out there, so I'd suggest a few things:
Another trick: you'll need to provide an SMTP server for those that don't know one to use. On unix, localhost works even in a corporate environment if it is set up that way and the mail should make it out. On windows - no such luck. So you could have them point at codehaus' SMTP, but then you get firewall issues. So it needs to be configurable too.
I see this as being more helpful for the CI than general use.
- clean up the exception handling so that stuff is caught/thrown at the right level (no throwing/catching generic Exception/Throwable unless it is the last resort). That way, as much recoverable errors can be taken care of.
- do like Maven 1 does and print an info/bug report message when the exception bubbles up to the stage we don't know what to do.
- default it to off. Give instructions in the above message of how to enable it for the next run. This is also wanted as you don't want to freak the users out.
Another trick: you'll need to provide an SMTP server for those that don't know one to use. On unix, localhost works even in a corporate environment if it is set up that way and the mail should make it out. On windows - no such luck. So you could have them point at codehaus' SMTP, but then you get firewall issues. So it needs to be configurable too. I see this as being more helpful for the CI than general use.