Can't catch Loop end errors with try catch

I have a workflow that scans directories for Excel files and then loads the data from them. The files are human generated so there can be differences between them for which I have a case switch. Any failing nodes during case identification or treatment, I manage to catch and save for later treatment. However, if the treatment nodes yeild a table with a differing structure from the standard one, I don’t manage to catch that error. The loop end doesn’t find a suitable head if it is before the catch errors.

This works

This doesn’t work

How can I capture the errors that can happen in the loop end node (differing table structure errors) within the try catch

Hi @sagar_ap ,

The fail that is happening in your 2nd version is kind of a “syntax error” if you will. If you look at your design, you are starting the try inside the loop, but trying to catch outside the loop.

The error message confirms that this is indeed the issue (Encountered loop-end without compatible head).

Design-wise, the way it’s done is not valid. Why do you need the catch to be outside the loop? You need to also move the try node outside the loop

1 Like

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