First issue / question:
if I will place a “return” statement in block1 then I was expecting to leave Function instead it leave only block1. Block2 and block3 code was executed. Is that expected?
Second issue / question:
What I need to do if I want to
terminate code execution from block3
transaction from block1 should be not saved in that case
capture my exception/termination reason in Kinetic. I am calling my function from Kinetic Application Studio.
I was trying to throw an exception but having issue with showing nice message to user instead of stack trace and could not access my out variables.
This is exactly what I did when I discover that ‘return’ is just leaving a block instead of leaving whole EFx. I wanted to make sure I wasn’t going crazy
I was doing similar thing but then I just drop using Boolean as I was checking if String (my ExMsg variable) is Empty. For communication with user I was using InfoMsg variable. Logic was following. Is ExMsg empty - not, then show it, if yes then check InfoMsg and show if not empty.
We are still on EFx level. I was already thinking about next step which is to suppress exception in UI and replace it with nice information. Not a problem in classic interface but I need to do in Application Studio. I believe I saw an option to suppress exception on rest-erp widget. Have to check it.