The use of throw having the global exception handler

Hello!! I am starting to implement the global exception handler in my projects, but I have a doubt, because if my project has several throws, the global exception handler enters these errors and takes them as unhandled.
the global exception handler is supposed to act when an uncontrolled activity presents an error, why does my global exception handler come in then?

@Juan_Esteban_Valencia

Use Try Catch block to handle exceptions which are thrown by using Throw activity. So that if any unknown exceptions occurred then it will be handled by Global Exception Handler.

Would it be this way? it is that when I execute it and it falls in this business exception it does not continue with the following transaction but with the following activity

@Juan_Esteban_Valencia That is how the Global Exception Handler works !

  • Global Exception Handler always rethrows an exception but it will not handles that exception and it can be done only using Try Catch block. That is why in one of the uipath doc was mentioned like below

  • Global Exception can be mainly used for unknown exceptions or system exceptions since it provides some sort of retrying mechanism

  • But for business exceptions it is not preferable to use you can simply go for Throw activity

  • Finally, the conclusion is you should use Try Catch block though you implement Global Exception Handler in your workflow

If you want it to continue to the next transaction you have to have a Try Catch around your entire set of steps that process the transaction, not just around one step.

image

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.