Send Email on Build Failure

The email SMTP feature works great. I am sending the HTML log to the entire team if the build finishes.

Now I am trying to figure out how to send an email if the build fails. I know that Final Builder can do this - but I cannot seem to find a sample of how.

Can someone please show me how to do this?

I found the solution. It is to use the Try-Catch-End logic like this:

TryCatchEnd

Enable or disable the Raise Exception action to test the Try-Catch logic.

In my FinalBuilder code, I send an email at the end of both Try-Catch sections with the FB HTML log attached. Finalbuilder then sends outgoing emails for both success and failure. If I have no email, then
I can be pretty confident that FinalBuilder is still running.

TryCatchEndSample.fbp8 (5.4 KB)

That works as long as the FinalBuilder task wasn’t terminated. Things like Visual Studio crashes can hang the process as well - Microsoft can launch error modal dialogs that require user intervention to unfreeze it.

Good point. Fortunately, I use the Delphi command line from inside FinalBuilder - which never requires modal interaction to unfreeze. It works exactly like I hoped it would without a problem.