Currently when a step in my Action Sequence throws an error it looks like the error is logged, further processing stops, and the error is returned in the html response.

In this scenario I would like to also be sending email, or a jms message, or inserting a record in a table.

How can I do this? Is there a hook into this process? When I build my own component the executeAction method does not throw an exception so I assume by calling error(msg,e) and returning false I do start the process.