FlightInfoEx no data available error

I have around 100 flights to be tracked and I am using FlightInfoEx which can provides the information I need. Just met a problem and want to ask if you guys can help, really appreciate.

I am using a loop to handle these 100 flights, the problem is for some flights, when I call FlightInfoEx and pass the parameters, the error message said “no available data”, how can I capture this error and CONTINUE my loop?
Try{
for (int i = 0; i < FlightsList.Count; i++)
{
aircraftFlightExInfo = fxmlObj.FlightInfoEx(FlightsList*, 1, 0);//error occured in this line and break the for loop when i = , for example, 5
//update db
//…
}
}
Catch(Exception ex)
{
}*

Put the try…catch inside of the for loop, rather than outside of it.

Solved my problem, thanks a lot !!!