Error handling

error

#1

Hi, I am getting inputs(a,b,c,d) from an excel file and then for each input, i run the sequence in a loop. But for example, i accidentally typed my input has an ‘e’ it will still run. I would like it to throw an error. I would like specify the inputs like it can be a,b,c,d then run sequence but any other alphabets need to throw an error. Any suggestions would be helpful

Thank you xoxo


#2

Surround the sequence of checking the rows for the desired content and further action into a Try-Catch block. Make sure to catch ‘BusinessRuleException’ exception types.

In an IF Block, Check for Excel information to contain desired content and perform your actions in the Then channel. In the Else channel, use a Throw activity to Throw a BusinessRuleException. Catch the exception with however you want the error to be processed.


#3

@nickboswell Hi, thanks for your suggestion. Seems doable however im not sure how to use throw activity


#4

@sangasangasanga use like below.

New BusinessRuleException(“Ur expception message”)