True/False value issue in the Try Catch Block

Hi, If you see I am checking a condition, and in the Else filed I assigned NullRow = True
same I assgned in the Catch block. but when it goes to Else part now the Value of NullRow become True but next step it should execute the Catch Block but it not going into the Catch block can you check.
image
image

@Palaniyappan

1 Like

@balkishan

use Throw activity and write below one instead of assing True value to it.

                 New NullReferenceException("Exception Message")
1 Like

Thanks Lakshman for the response.
I did it, but I want to Execute the Catch part of try catch block. Once it goes to the Else part.

1 Like

@balkishan

If condition failed then it go to Else part and it will throw NullReferenceException then it will come to Catch block as Try throw the exception.

1 Like

the reason is though we have created a flag we have not let the process to get into CATCH block and usually a process in TRY block will go to CATCH block only when a exception is thrown
so THROW a exception with THROW activity
with these steps
Like in the same sequence mention above inside the IF condition, instead of SEND OUTLOOK MAIL ACTIVITY and BREAK activity use THROW activity
where create a business exception like this
New BusinessRuleException(“CUSTNAME column has a null valuee”)
so this will take use to CATCH block where we can have our SEND OUTLOOK MAIL ACTIVITY

kindly try this and let know for any queries or clarification
Cheers @balkishan

Throw activity itself showing the exception.