You can set the error handling to "Custom without rollback". Then you can set another activity as a error handler.
So if the send mail fails, it will execute that activity. That way, you can easily log email errors. After triggering this java action, you don't know if the mail is really delivered. You should handle the bounce mail.
Edit after Bas' comment:
Note that this of course does not guarantee that the email actually gets delivered, SMTP has no support for this and once its out of the hands of the SMTP server you use, it can't really tell what happens to it afterwards.