Throw, Rethrow and Global Exception handler

Throw, Rethrow and Global Exception handler

1 Like

Hi @vivek_sinha

  • “Throw” activity is only useful if you want to simulate an Exception like in an If condition or something which will end the process or enter the Catch.
  • Rethrow ” activity is useful if you want activities to occur before the Exception is thrown, so in the Catch you would put that activity and it will throw the Exception that occurred originally that put you into the Catch and end the process.

Have look on the Documentation for more information

Regards
Gokul

Hi

I appreciate your interest and passion to know the activity and it’s properties

But by next Pls be clear with the query you want to get clarified

On a note that these are EXCEPTION handling methods / activities used in UiPath

There are five activities for handling exception

  1. Try catch
  2. Throw
  3. Rethrow
  4. Global exception handler
  5. Retry scope
  • Rethrow is used when you want activities to occur before the exception is thrown.
  • Throw activity is used when you want to throw error before the execution of the step.
  • Try Catch activity is used when you want to test something and handle the exception accordingly. So, whatever you want to test you can put it under the try section, and then if any error occurs, then it can be handled using the catch section, based on your input to the catch section. Apart from the try-catch, we also have a Finally section which is used to mention those activities which have to be performed after the try and catch blocks are executed.
  • Retry scope activity Retries the contained activities as long as the condition is not met or an error is thrown.
  • Global exception handler
    The Global Exception Handler is a type of workflow designed to determine the project’s behavior when encountering an execution error. Only one Global Exception Handler can be set per automation project.

Let us know if you have any further queries

Cheers @vivek_sinha

2 Likes

Where can I use global exception handler ?

For an example

Cheers @Aleem_Khan

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