Skip to main content

I’m looking to generate distinct error categories via the “Error Handler - Throw” action (e.g. Business Exceptions vs System Exceptions). “Error handler - Throw” seems to be built for this use case - there’s a dropdown where we can select error type. However I can’t find any options in the product or on the docs pages about how to add/manage error types. There’s only one option available originally (AllErrors).

 

I am looking for the same thing. @Micah.Smith Do you know if there is a way to create custom exception types? I looked in the package SDK and couldn't find anything there either. It would be awesome if there was a way to do this, especially when it comes to handling business exceptions. 


Hello, 
Is does any one got an answer for that? 
I am looking at it as well...


Anyone have an answer?


So I found the way to do this. In the package.template file add the following 

 


Sorta useless though since you can’t actually have multiple catch branches…. at least that is the way it appears to me. Would love for someone from AA support to actually confirm this.


Has anyone found an answer for this yet? 


For custom error you need to use throw action. Within throw action you can put your custom business exception message and it will be caught by catch block( Currently AA support generic error handler) . It works fine. I hope it helps. You can have multiple try catch block and within try catch block you throw error. 


So I found the way to do this. In the package.template file add the following 

 

Thanks ​@V1Dylan , this is really helpful.

Out of interest, how did you know this? The SDK documentation doesn’t mention this: https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/developer/create-custom-exceptions.html

 

Thanks


Hi ​@Adam Wilson.

Thank you for your help.

We’ve implemented the dropdown for catching different types of exceptions in the "Catch Error" command (Your method works!). However, even when we select our custom BusinessException, it still catches all types of exceptions instead of just the specified business exceptions.

Moreover, we are facing a preprocessing failure whenever we use multi-catch. Regardless of the type of exception being caught, the process fails as soon as there is more than one catch command.

This situation renders the current setup ineffective. I appreciate your assistance in resolving these issues.


Hi ​@isamim ,

 

I was facing the same pre-processing error, so have had to deprecate our exceptions unfortunately.

Besides, I am unsure if this is supported as AA SDK documentation doesn’t specifically mention how to do this, and no other default packages in the control room have their own exceptions - so I am not sure how ​@V1Dylan came across this, but it’s certainly undocumented. 

 

Many thanks

Adam


@Micah.Smith Hi,

 

Is there an official stance from AA on whether this type of custom exception implementation is supported with the package SDK? If so, is there any official documentation regarding this please?

Thanks!

Adam


@Micah.Smith Hi,

 

Is there an official stance from AA on whether this type of custom exception implementation is supported with the package SDK? If so, is there any official documentation regarding this please?

Thanks!

Adam

There’s documentation for creating custom bot command exceptions here:
https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/developer/create-custom-exceptions.html

We do not have any provision to throw any custom error and catch particular error


Reply