Exit out of a workflow without displaying the UIPath auto generated pop up message


#1

I want to exit out of a try catch block by displaying a personalized message and do not want the auto generated pop up message to be displayed.

I have used the message box in the catch block and used terminate workflow in finally block. The message box is being displayed after the exception is caught but additionally the auto generated pop up is also coming which I do not want to be displayed.


#2

@Sayan,
Can you please share the xaml file so that i can test it?


#3

Sample.zip (21.6 KB)

Attached are the 2 excel sheets on which work is being performed and also the relevant xaml file.

Points to note:
a)Emp_Details.xlsx is the master excel file.
b) I have used try and catch blocks for 2 occasions i) To test if file is present ii) To test tab name is correct
c) Just rename the Emp_Details.xlsx to some random name the message box with custom error message will appear.

However, once you click ok, a workflow exception window automatically generated by UI path also appears as it is going to the next step in the sequence that is to write range.

But, that’s what I don’t want. I have even tried to place the terminate workflow activity in the finally block as the catches block has the message box but I am unable to find the solution.

All I want is the bot to display the custom message and terminate without showing the Workflow exception window.

Thanks in advance.


#4

Hello @Sayan,

Check out how i tweaked your workflow! :wink:
A simple workaround!
Main.xaml (14.9 KB)


#5

The extra variable Flag… Yes really worked!! Thanks… :smile::smile:


#6

Please do mark it as a solution so that it is helpful for others as well :slight_smile: