Error and Exception Issue - Beginner help

Hi all,
I am working on a question in UiPath Academy RPA Developer Foundation.
I do not understand why my workflow doesnt work.

@yodeedee Can you explain what issue you are facing with screenshot or error message so that we can help.

Hi all,
I am working on a question in UiPath Academy RPA Developer Foundation.
I do not understand why my workflow doesnt work. Under ‘Catches’, I want to generate message at output panel with ‘Log Message’ Activity, but it does not appear even if the workflow proceeds to Finally>If > Then> Message Box ‘Bye’.

Please help thankyou.

My workflow:
Main.xaml (11.0 KB) Main.xaml (11.0 KB)

1 Like

The scenario is that I will closed the browser with my desired url for exception to happen.

If there is no error in the TRY part, it won’t execute the catches block @yodeedee. May be that is the reason your catches block doesn’t execute.

Hi @yodeedee

If you know that you will encounter an error you can use Throw Activities and it will go to the exception .

cheers :smiley:
Happy learning :smiley:

2 Likes

Hi HareeshMR, thanks for replying to help!
The exception that I am trying to catch is that browser is not present during the execution (as seen inside TRY). In order to make error in the TRY part, I will not open the browser so that exception can happen. Does it make sense?

Hi pattyricarte, thanks for helping!
Do I put the Throw inside the Try? What do I put for the expression for exception in Throw?

1 Like

It depends upon you. You can put bussines or exception.if you put exception it will terminate the apps.but if you have bussines rule then just put the bussines exception @yodeedee

2 Likes

Hi pattyricarte
I encounter this when Throw is added into Try.


2 Likes

Hi @yodeedee

What excatly do you want to do?
You want to open chrome with the given url ?am i correct ?

cheers :smiley:

Happy learning :smiley:

2 Likes

Hi pattyricarte!

I want to collect data from browser. The first step is to open the browser page. I want to implement a TryCatch to make sure the correct browser page is open before user runn the workflow. So I think the Catch is still not catching the exception. While Throw Exception will work, but it seems to stop the workflow once exception is countered. I want the workflow to continue (at Finally) to either tell user to ‘Open browser page’ (during exception) or ‘continue on browser’ (Without exception) so I would still wish to use TryCatch, in the case. I am lost at how to fix it.

1 Like