How to use GlobalHandler

Hi All.
I have created a GlobalHandler workflow in Re Framework.
I am expecting it to trigger when the exception is not handled.
But it’s getting triggered even I have handled the Exception(UiPath.UIAutomationNext.Exceptions.NodeNotFoundException)

Please let me me how it works.

Are you using Throw activity? If you are rethrowing it will be caught by Global Exception Handler.

  • If an exception is not caught (like there’s no Try-Catch that handles it), the Global Handler will be called.
  • If an exception is caught and re-thrown (Throw activity), it is treated as unhandled and the handler will trigger.
1 Like

@Suresh3

Welcome to the community

The behaviour of geh in UiPath is like it get triggered whenever there is an error even if there is a try catch or no it first goes to geh hand then goes to next action

Only exception for it is if an activity is surrounder by try catch and there is no sequence or any other activity in same try block then it wont go to geh

Cheers

1 Like

Hello,

Its poorly named as it functions as a first chance exception handler, firing if the exception is handled or not.

It also fires on every container on its way up the stack until it reaches an exception handler.
Its only really useful in logging or very basic scenarios. I’d suggest avoiding it.

1 Like