Unable to proceed to next item when using try catch

Hi everyone,

I have a sequence that looks like the below,

The sequence iterates through a folder list and should an error be encountered the execution should go on to the next folder in the directory.

The issue i am facing is that the execution does not proceed to the next folder in the directory when an error is encountered . Any tips on what i am doing wrong ?

Thank you.

Hi,

If you run debug mode, can you try just “Run” or “Run File”.
or
Give it a try to turn on “Continnue on Exception” in ribbon menu.

Regards,

1 Like

Hi @ayub_z ,

I can see 4 action in catch, are you using throw ?

1 Like

No i am not using throw.

Can you also please share the screenshot of body sequence ?

Here is the body,

So the error occurs at the last Sequence named Sequence

Actually I am using Run but not in Debug mode

Can you try to run it in debug mode and also check the count of list before foreach ?

Just check in debug mode from which point it is coming out of loop.
You are missing something.

Make sure your list have more than 1 count if you are looking for multiple iteration.

Thanks.

I have more than one folder in the directory. The error occurs in the Sequence sequence. The logic here is that should a ui button not be found it means that the item was not found and execution should proceed to the next folder.

The code in the Catch is defintely being executed as i log the output to a text file. The issue here is that after the code in the catch is executed the execution does not go back to the loop. No idea why.

The type argument for the loop is a String and folderList is an array of string type. I am using the same logic for going to the next data in an excel sheet but for some reason on this loop it does not seem to work

Your flow looks fine, can you once change SelectorNotFoundException to System.Exception ?