Use the --continue parameter for flexible error handling in scripts
Handling errors effectively is essential when writing automation or CLI scripts. You need to know what happens when things go wrong so you can decide whether to stop the script, retry, or ignore the error.
Each ACLI client follows a consistent error-handling protocol. For more details, see Understand exit codes for error handling in ACLI.
ACLI also provides the --continue parameter to facilitate scripting. This option allows you to manage errors more flexibly, especially when running batch actions or dealing with expected failure conditions.
Use --continue with run actions
Common run actions such as run, runFromCsv, runFromSql, and runFromList—as well as many product-specific runFrom... actions—support the --continue parameter.
By default, these actions stop when the first error occurs. You can override this behavior by adding --continue, which tells ACLI to keep running the remaining actions and show a summary of any failures at the end.
Behavior summary:
Default behavior (no
--continue): Stop on the first error.With
--continue: Continue running even if errors occur, and display a summary at the end.
Use --continue for specific actions
Some individual actions also support the --continue parameter. This is useful in situations where you want to ignore certain expected errors without skipping more serious ones.
For example, many scripts try to:
Add or create an entity that might already exist.
Delete or remove something that might not exist.
Add users to groups or remove users from groups.
In these cases, you typically don’t care if the item already exists (or is already missing). You just want to ensure the state, without the script breaking on those minor issues.
To support this, ACLI defines a specific error-handling protocol for these types of actions. Only actions that explicitly state they support --continue have implemented this behavior.
Using --continue on those actions allows ACLI to ignore only the expected errors, while still surfacing more serious problems that can require manual intervention or different handling in your script.