Catch block not executing

Hi all,

I am using try, catch for work order completion in emulator however I observed in case of error inside try the control is going to catch but not inside the catch block, I tried using finally however this will be quite cumbersome as I have multiple conditions and nested codes. Also in case of a function calling another this will be very complex. Can anyone please suggest a better approach or maybe how can I use try catch, but what I understand from the article it can not be used:

It’s strange that you you attached a screenshot of documentation explaining that exception can’t be caught in transactions but you didn’t mention whether your code is inside a transaction or not.

I’ll assume it it.

Then you’re trying to catch exceptions at a wrong place - you must do it outside transactions. Either move your try/catch statement outside the transaction or move the transaction to the try block.

Finally can’t help you in any way.