How do I capture only specific exceptions?
Comments
-
DISCLAIMER: If you're trying to catch an exception for only one step, please see: Exception Handling Best Practices (On Exception Outcome Path section)!!! If you need to catch a particular type of exception not specific to one particular step, the following steps may be helpful:
If you use a catch exception step, you can check if the outputs of the catch exception step contains the exception you would like to handle. Please refer to the following example:
In this flow, after the catch exception step, there's a String Contains step checking to see if the exception step name contains the word Email. If true, the flow goes down the true path, where you can handle that specific kind of exception; otherwise, it throws a non-catchable exception (so that the catch exception is unable to catch that exception as well).
The throw non-catchable exception takes in the exception message, so that the end user will see the same exception message as they would if we weren't using the catch exception step; however, how you choose to handle either outcome is up to you!
Because the first step in the flow is a divide step where we're dividing by zero, the flow will throw the following exception if run:
The flow is able to throw exceptions as usual while still handling exceptions for all email steps.
Howdy, Stranger!
Categories
- 4.2K All Categories
- 67 General
- 11 Training
- 203 Installation / Setup
- 1.1K Flows
- 107 Rules
- 262 Administration
- 212 Portal
- 494 General Q & A
- 698 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 52 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 180 Pages
- 5 Process Mining
- New Features
- 179 Datastructures
- 69 Repository
- 221 Integrations
- 28 Multi-Tenant
- 27 SDK
- 80 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 83 Lunch And Learn Questions