Catch Block not getting execution

boolean flag = false
> try{
> 						flag=WebUI.verifyElementVisible((AckCheck),FailureHandling.CONTINUE_ON_FAILURE)
> 						if(flag == true) {
> 
> 							println('Element Present')
> 							WebUI.click(AckCheck)
> 							WebUI.delay(1)
> 							WebUI.click(AckBtn)
> 							break;
> 						}
> 						else{
> 							println('Product not located on current slide')
> 
> 						}
> 					}
> 					catch(StepFailedException ste)
> 					{
> //						
> 							KeywordUtil.logInfo('Unable to locate correct element immediately...'+ AckCheck )
> 							println('Element NOT Visible')
> 							WebUI.delay(2);
> 						
> 					}

Still, I am getting Step Failed Exception.
Can anyone help here?
Thank you in advance

Remove your break statement from the routine. That 's likely your concern. You don’t break out of an if block. Or comment it out and test again.

Just a note that you do not need to compare if (flag == true) but can shorten it to just
if (flag) {
because flag is a boolean variable. If flag is true, it will enter the upper block. If flag is false, it will enter the else block.

You don’t even need the flag variable. You can use:
if(WebUI.verifyElementVisible(AckCheck)) {
because its return type is boolean.