I have created an exception handling case where it should detect if there is a duplicate in an Array set, but the try and catch is inside a for loop iterating through the set an