How to create Custom Exception in UiPath

Hi,

Anyone have any idea of creating custom exception in Uipath.

Regards,
Prakash M

Hello @prakaz25

Use throw activity where you can pass your custom error message

Regards
Ajay

We have Business Rule Exception to send the custom error message @prakaz25

2 Likes

Hi @prakaz25

As @Ajju said, you can use Throw activity.
To throw a system exception, use new Exception("Exception message here.")
To throw a business exception, use new BusinessRuleException("Business rule exception message here")

Hope it’s clear.
Thanks and regards :slight_smile:

4 Likes