OpenRPA.BusinessRuleException thrown inside Invoke Code does not get caught in Try-Catch

As the title says: OpenRPA.BusinessRuleException thrown inside Invoke Code does not get caught in Try-Catch.

Example is attached
BusinessRuleException from Invoke Code.json (7.9 KB)

OpenRPA version 1.4.46 (EDIT: Just tested on 1.4.49 and it’s the same)

Currently you cannot do that from invoke code ( all exceptions gets caught and throw as a new exception ) so you need to use the activity for throwing them
image

But i think that is an option that should be possible. So i will try and create a new version of OpenRPA, where the original exception gets added as an inner exception that can be unwrapped using a flow like this .
image

The only reason I started doing it, was that I sometimes prefer doing a lot of logic and checks, within Invoke Code. And then I thought I might as well also throw the Exceptions from there, as then passing on different error messages where also easier.

But it could be very nice if it can be possible at some time :slight_smile:

try this build

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