Business exception is not getting captured in business rule catch block

Code is in windows versions.
In my try block i’m using throw activity to throw the business exception.
New BusinessRuleException(“error details”) and in my catch block i have system.exception and BusinessRuleException block but everytime it runs exception is getting catched in system.exception.
First i have business exception and then systemexception in catch block.

Did anyone face this kind of issue in UiPath? Please help if anyone know solution for this

1 Like

Hi @harshika.10732998

Could you please share your workflow? I have tested this just now on Studio Web and Studio Desktop and by having the Exception catch first and then second, but it worked correctly for me in all those experiments:

1 Like

@loginerror - I cannot share the workflow as it is at client side. I also tested in a dummy sequence with throw activity and it works fine, it’s just not working in one particular flow.
There is only one try catch block in that flow and one throw activity. I debugged the flow it throws properly business exception and then it goes to system.exception block.
Any suggestions?

screenshot of the try-catch block modelling and the part where the BEX is created should still be possible

1 Like

@harshika.10732998 i"m doing a replica as you told but everytime my catch goes in BE Catch block so make a small test case and if you are still getting the same error kindly share that test case…
The image shows a "Try Catch" block in a workflow with a sequence that throws a BusinessRuleException, and catches for BusinessRuleException and Exception both writing lines. (Captioned by AI)
The image displays a "Try Catch" block in a programming environment, specifically configured to catch a "BusinessRuleException" and write the exception message. (Captioned by AI)


cheers