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