System exception ( Do I need to catch)

Hi all, I need to throw a system exception and then have the bot move to the next activity. Do I need to catch it?
Please advise.

Hi,

You don’t need to catch it unless you are going to log the exception information and create rules accordingly.

If the activity you are using has the continue On Error option, you can choose True.

image

Regards,
MY

If you don’t catch it, the Job will fault.

Also, you don’t usually throw a System Exception. Generally we use Application Exception or Business Rule Exception (both children of System Exception). Which to use depends on what/why you’re throwing. For example, a screen failed to load would be an Application Exception. A value didn’t match what it should, that’s a Business Exception.

My bot evaluates a condition. and if two numbers don’t match after trying 2 times it should throw an exception and move to the next activity. I have been asked to use the System exception. I’ll have to catch it before I can move to the next activity?

Yes, if you don’t have the Throw inside a Try/Catch, the automation will fault.

I would follow up on WHY they want you to use System Exception. It’s really not correct to throw the parent of all exceptions types.

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