c# continue foreach loop after exception