Error handling and Try-Catch

Make a process resilient – catch errors with the exception connection and wrap a group of steps in a Try-Catch block so a failure is handled gracefully instead of stopping the run.

Help CentreBuilding Processes

Real automations hit problems: a website is slow, a file is missing, an app shows an unexpected popup. Automize gives you two ways to handle these gracefully so a single failure doesn't halt the whole run – the exception connection and the Try-Catch block.

1. The exception connection

Every activity can have an EXCEPTION connection in addition to its normal one. If the step fails – an error, a timeout, something unexpected – the process follows the exception connection instead of the default one.

  1. Add the step you want to protect, and the step that should run if it goes wrong (for example "Log the error and send an alert").
  2. Draw a connection from the protected step to the recovery step.
  3. Click the connection and set its type to EXCEPTION. It is drawn in red on the map.

For more on connection types, see Working with Process maps.

2. The Try-Catch block

An exception connection protects a single step. A Try-Catch protects a whole group of steps at once. It is a container you place on the map with up to three zones:

  • Try – the steps you want to run normally. The process attempts these in order.
  • Catch – the steps that run if anything inside the Try zone fails. This is where you recover, log the problem, or notify someone.
  • Finally (optional) – steps that run afterwards either way, whether the Try zone succeeded or failed. Use it for clean-up that must always happen, such as closing a file or logging out.

2.1 Add a Try-Catch block

  1. Open the Add panel and choose Try-Catch.
  2. Place the activities you want to protect inside the Try zone.
  3. Place your recovery activities inside the Catch zone.
  4. If you need guaranteed clean-up, turn on the Finally zone and add steps to it.

3. Which to use

  • Use an exception connection for a single risky step with a simple recovery.
  • Use a Try-Catch when several steps form one unit of work that should succeed or fail together, or when you need guaranteed clean-up with Finally.

When you test a process, failures and the paths taken are visible in the run log and history – see Running and debugging a process.

Related articles

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.