Say I have created an automation where a group of commands runs and finally, completes an ecommerce process.
The automation script on this website potentially fails at quite a few places, following which an error occurs and the next loop continues.
What I want to do, is log the error and the loop number in a csv file. Typically, this will be possible through something like exception handling, where I can enclose all my code in a parent block, and a catch block will handle the logging of the error case. How do I do this in Kantu?
I went through the commands and statusOK or GotoIf are two options, but looks like I need to check them after every command. Is there a way to check the status for a group of commands?
!LastCommandOK is reset after each command, but!StatusOKis not:
!StatusOK will be “false” if one command in a list of commands has an error. A successful command after an error does not change the status back to “true”. But if needed, you can use store | true | !statusok to explicitly reset the command back to “true”.
But how do I use !StatusOK. I will still need to check the value of StatusOK after each command in my script. Can the control go to a designated line once the value of StatusOK changes?