KAPOW

Welcome to the Kapow forum. Here you can get help, use your skills to help others and enjoy hanging out in the company of other Kapow Robot Developers.


Try Catch in Kapow robots

Share

tea

Posts : 10
Points : 91
Join date : 2018-09-05

Try Catch in Kapow robots

Post by tea on Wed Sep 12, 2018 3:36 pm

Hi! 

I would like to mimic the Try Catch functionality, i.e. 

Try
{
inner code
}
Catch
{
exception handling
}

My problem is, with the Try step and the next branch, it seems like I have to go and configure that exception handling tab of every single step of what comprises my inner code? If I have ten steps then I have to remember to change these settings for all of them, or else my entire robot will fail? 
I am used to working with big chunks of code sitting inside try blocks, so that if something unexpected happens, the exception will always be caught no matter what (even if it is due to a mistake comitted by the developer). Is there a way of achieving the same with Kofax Kapow robots? Like a general try block that will catch any exceptions, no matter the configurations of each step? Or is there a setting somewhere to force the kind of behavior that I want?

Virulent

Posts : 6
Points : 76
Join date : 2018-09-10

Re: Try Catch in Kapow robots

Post by Virulent on Thu Sep 13, 2018 3:45 am

My understanding (granted I'm still only a few months into Kapow), is that if an unhandled error is thrown, it goes back to the last Try step to look for handling there.   It's probably best to configure each block, but if you do miss one, make sure your Try step has proper handling and it shouldn't all blow up.

tea

Posts : 10
Points : 91
Join date : 2018-09-05

Re: Try Catch in Kapow robots

Post by tea on Thu Sep 13, 2018 12:13 pm

Are you sure? When I have tested this in studio, it only goes back to a try step if it is configured to do so in the exception handling tab. I also have to specify if it should go back to the last, or to a named try somewhere earlier. I have to do this if I have had other tries in between this step and the try where I want a potential exception to be handled.

Sponsored content

Re: Try Catch in Kapow robots

Post by Sponsored content


    Current date/time is Thu Nov 15, 2018 12:05 pm