KAPOW

Would you like to react to this message? Create an account in a few clicks or log in to continue.
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.


2 posters

    Try Catch in Kapow robots

    avatar
    tea


    Posts : 11
    Points : 2084
    Join date : 2018-09-05

    Try Catch in Kapow robots Empty Try Catch in Kapow robots

    Post by tea 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?
    avatar
    Virulent


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

    Try Catch in Kapow robots Empty Re: Try Catch in Kapow robots

    Post by Virulent 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.
    avatar
    tea


    Posts : 11
    Points : 2084
    Join date : 2018-09-05

    Try Catch in Kapow robots Empty Re: Try Catch in Kapow robots

    Post by tea 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


    Try Catch in Kapow robots Empty Re: Try Catch in Kapow robots

    Post by Sponsored content


      Current date/time is Sat Apr 27, 2024 3:01 pm