Try catch flow

Hi,

I have a main sequence that calls sequence1.
Sequence1 calls Sequence2, Sequence3 etc.

Main and each of the sequences are enclosed in try catch. I notice that if there is any error in any where, it is going to the catch and stopping there without going to next sequence or continuing. Why is that? If there is an error with sequence2, I like the flow to continue going to Sequence3. What change I need to make?

Thank you,

Hi @A_Learner

By default, when an exception is thrown in a sequence, it will propagate up the call stack until it reaches the nearest enclosing catch block, which will handle the exception and terminate the current execution. This is why your current implementation is stopping at the catch block and not continuing to the next sequence.

If you want the flow to continue to the next sequence even if there is an exception in the current sequence, you can add a Try Catch activity inside each sequence, instead of having a single Try Catch block in the main sequence. This way, when an exception occurs in a particular sequence, it will be caught by the Try Catch block within that sequence, and the execution will continue to the next sequence.

Hope this helps,
Best Regards.

Thank you,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.