Try Catch not Working?

Hello,
I’m trying to catch errors on a Read Range when a sheet doesn’t exist:
image

My flow :

Try block :
image

Catch Block :

The problem, he does not fit into wrestling. I’m not debugging but I’m executing the file. Do you have an idea ?

Hi @DimitriLYR - Instead of defining the exception as System.Argument in catch block, can you define as System.Exception and check whether the exception is handling or no.

@DimitriLYR

  1. ArgumentNullException: This exception is thrown when a required argument is null, and the method or function does not allow null values.
  2. ArgumentOutOfRangeException: This exception is thrown when an argument’s value is outside the range of valid values accepted by the method or function.
  3. ArgumentException: This is a general exception class for invalid arguments that don’t fit into the more specific subclasses mentioned above.

This Exception don’t fall in this category. you need to pick systems exception which cater to all the exceptions

Even in System.Exception it is not managed.

@DimitriLYR - Try updating the UiPath.System.Activities package and see how that goes

Picture1

I tried all the exceptions, none worked. :confused:

I already have the latest version 23.6.0 preview

@DimitriLYR - Preview package doesn’t help some times. Can you please downgrade the package to some stable version and check once

I downgraded to previous versions. I still have the same problem

@DimitriLYR
I used same package, its working for me.

@DimitriLYR - Can you try with excel scope activity instead of workbook and check once.

Very strange. I just recreated a project. It works perfectly. Looks like my project is corrupt :confused:

@DimitriLYR whole project can’t corrupt. did you try to uninstall the package and reinstall same one

I’m try to unistall and install the package. It’s not working

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