Break the flow of BOT

Hello,

There is a BOT having 100 hundred steps and exception is placed between steps 5-25.
If an exception occurs and one wants to exit the process, is there something available like a BREAK function.

Thanks,
Vaibhav

Hi @vaibhav_a1YTwn, the break function is not available yet.
You can leave the block “If an exception occurred” empty - in this case the bot will stop once an exception occurs.

Not sure if Exception Handling functionality has been updated since you posted this, but currently if you leave ‘if an exception occured’ empty, the bot just continues with the next step in a “While” loop. I was trying to use Exception Handling to gracefully exit a bot, but ended up having to force an error in a naked If-Else condition to crash out of the app.

Howndo you force an exception ?

Ok…I’ll be the first to admit that this is really ugly, but I needed a way to conditionally exit a bot process during a While loop. So, I used an If-Else condition, and in the Else statement I added an Action that I knew would throw an error. In my case, I used a Window action configured to look for a nonexistent window. Voila, a forced exception.

In no real world situation would this ever make sense, but it’s the only thing I could figure out that acted like a Break action would act.

Thank. I am also using a ugly method to force an exception - opening a non-existence file. :slight_smile:

1 Like