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.
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.