Using global exception handler with Try Catch


I have created a pretty complex flowchart that invokes a couple of other workflows (which also invokes other workflows). building this program I have used a lost of try catch activities to make sure things are getting done. but there are a lot of exceptions that cannot be foreseen, so I decided to include the global handler, now the problem is that the global handler is interfering with the “Catch” activities that are placed in the “Try Catch”

Any thoughts please ?

Good morning Rasoul,

Have you tried implementing the REFramework for your process?

It has built in high-level and low-level exception handling.

1 Like

@Rasoul did you try to use erroraction.ignore instead of erroraction.continue after the max attempts? That should help you to go to catch block

Yes, I am facing similar issue. The global exception handler interferes with the Try Catch exception handler resulting in undesirable outcome. My understanding was, when the exception is handled in Try-Catch, Global Exception handler will not be invoked. Bur it doesn’t seem to be working that way.

Me too post.

I have a global exception handler in the application, but call a workflow wrapped in a try catch.

Any exception inside the called workflow will bypass the except section of the try catch and go directly to the global.

I cannot imagine any circumstance when this would be correct or desired behavior, and it makes writing test cases all but impossible.

I would suggest that this behavior renders the global exception handler all but useless, when i had such high hopes for it when i first saw it. The idea is great, but this “bug” is terrible.

I have a similar behavior and I do not understand the behavior of the global exception handler. It is working the other way around. I thought it is the last interceptor because it comes out to the system but it is interfering as @Rasoul described. I was not expecting this.

I am also using a global exception handler and within this workflow I am using a try catch activity to firstly try to close the applications. If this does not work, the exception is catched and the processes are killed.

The problem is that the catch with System.Exception and KillAllProcesses is never triggered because of the GlobalExceptionHandler.xaml.

What is the suggested way to still use try catch blocks in combination with global exception handler? I copy and pasted some of the activities of the REFramework.