I'm using Fabric to manage remote deployment of my blog that uses the static site generator Pelican. Whenever I drop a new file in Dropbox, I use Dropbox webhooks to launch a series of tasks that are on a Heroku server. The tasks are managed using Fabric.
Because this is all done remotely, I currently have to manually inspect the logs whenever I realize that something went wrong. I'd like Fabric to email me whenever it aborts due to an error.
How can I catch a Fabric abort so that I can have it send me an email?