Use try catch?

Now I have use try catch.
but I have question about it.

Now I use block try use read data for each row and access data to web
and catch block I use screenshot and send mail

Question :
In block try I use read for each row and access data to web. If error in web I want to go to next row.

But I don’t know how to do?

Please guide me for solve it.
Thank you.

In general, it’s necessary to use TryCatch inside the loop as the following, for example.

Regards,

Accessing data from web part alone you can add in another try catch inside the for each loop

@Stef_99

Use try catch inside for each so that if any row fails it goes to next row

Cheers

1 Like

Add all the activities after for each in the try-catch block
In catch block handle the exceptions according to the requirement

@yoichi @Anil_G What set in catch block (for next row)

Hi,

If there is no activity after try-catch, it’s unnecessary to put any activities because it process end of the loop after try-catch and process next row. (However, it’s better to put LogAcrivity to display error occurs.)

If there is an activity after try-catch, use Continue activity.

Regards,

@Stef_99

you can use only a log

but as its ui activity you can use reset activities if any to bring the ui state as needed

cheers

Hi,

I think it seems necessary to use Try-Catch in Try-Catch. Or it may be better to extract inner logic to another workflow file then call it for readability and/or maintainability.

Regards,

For example, how about the following? If error occurs 4 times, exit the loop immediately and send an email in outer catch block

Regards,

1 Like

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