Type of Exception

studio
exception

#1

Dear all,

I have a question, I use some process with different program (excel, word, internal program, IE…)
And when I have an exception in my report, I have only Application or business.
I would like to know if it’s possible to define a specific exception for each software? ( I mean when excel crash for example, it’s possible to have in my report Excel exception instead Application exception?

I try the “create exception” activity but I don’t find how appear in my report.

Any idea ?
Thanks,
Q


#2

Hi,

I don’t know if this helps but you can define your own Exception with the Throw activity.

Example:
new UiPath.Core.BusinessRuleException(“Excel blah blah blah”)
(There are also examples on this forum)

If you would like to know different parts of the exception, then inside a Catch of a Try/Catch, you can use exception.Source or exception.Message, et cetera. (I think exception.Source only works from an Invoked workflow)

You can also use Log Message to show an error occurred and your custom message, however, an exception won’t be thrown if that’s all you do.

Regards.


#3

Hi Clayton,
Thanks for your help, I will test, try and back after.

Best,
Q