Here is an example.
You will have to adapt it to your needs and to your own table, of course.
The idea is :
- create a main process
- add your business process as a subprocess
- link it to the ErrorHandling subprocess with an "unsuccessful" link
There are other ways to do it and to make it a more "generic" tool, for example with options for sending emails, writing to log files, launching deliveries, etc.
I hope this helps