Catch unknown exceptions

Hi, I am using else ifs in my try block to catch multiple business exceptions while in the else section, if there are no errors it will be added into my datatable. Hence, in my catch block, it will display the business exception’s error message.

However, is there a way to catch unknown business exceptions or just unknown exceptions in general? Appreciate any advice or help given.

@jhong

Add a catch block with system.exception…it would catch all the other exceptions other than the business exceptions you raise

Cheers

1 Like

Hi @jhong

If you have any unknown exceptions that will occur you can specify them under System Exception. In the Catch Block you can catch business exceptions with that you can System.Exception and catch the unknown exceptions.

Regards

1 Like

Hi @jhong

Add catch in your try catch activity.

image

Use system.exception in log message inside catch it will show you the error message occured in Try section.