How to disable Exception Prompt?

Hi,

While doing exception handling to my project still I am getting Exception prompts after pushing my activities into try catch.

image

image

image

I am facing the same issue for Read range sheet not found case as well.
How can I disable these run time execution error prompts.

Thanks.

Please add one more exception type in Catches block.
You are handling only SqlException type.
Add one more to handle all exceptions.

@KarthikByggari, Even after adding one more exception type as Exception, it is still showing the same exception prompt.

image

That’s strange.
Can you re-start Uipath studio and try again.
And also check if you had proper connection string used in the Connect activity.

Hi,

The Error Message Is thrown by your Terminate Workflow Activity.

1 Like

This worked to handle exception prompt, but then how to terminate the process after that.

Your workaround maybe is by setting a flag hasError, then setting it to true on your catch block. And so if hasError = true, then do nothing, or break the loop, or go to the End state. By then your workflow will end.

Maybe the behavior of the terminate workflow is to mimics error occurrence in a workflow.

1 Like

Thanks @Emman_Pelayo for giving replies.

Yes I’m trying to do the same as you mentioned but my workflow is a sequence not a flowchart and it does not contain any loop, it contains sequence of activities, I pushed each activity to try catch whenever I encounter any exception in any activity I am setting exceptionFlag variable to true in corresponding catch.

But in this process I must use nested if activities to check for exception flag and move further but my workflow will become very very complex.

Please suggest how can I handle this situation.

Thanks

Hi

Do you just want to end the workflow with a generic error message? You may check the throw activity, you can set the message you want like new Exception(“DB Connection error”). You can set it in your catch block.