I have a requirement where in program execution flow should continue even after throwing an exception.
for(DataSource source : dataSources) {
try {
/
If an exception occurs on the for(DataSource source : dataSources)
while calling dataSources
to initialize the iterator, then that exception will not be caught.
Is that what you mean by "If exception is thrown in the first iteration, flow execution is stopped."?
If this is the case, then there's nothing else you can do and the loop should not execute any interations.