Explorar el Código

Don't let it blow

Piotr Czajkowski hace 3 años
padre
commit
e4955c55af
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8 1
      ProcessFiles/ProcessFiles.cs

+ 8 - 1
ProcessFiles/ProcessFiles.cs

@@ -62,7 +62,14 @@ namespace ProcessFiles
             if (!IsValid(path, fileExtension))
                 return;
 
-            callback(path);
+            try
+            {
+                callback(path);
+            }
+            catch (Exception e)
+            {
+                _errors.Add(e.ToString());
+            }
         }
 
         private static void ProcessDir(string path, string fileExtension, Action<string> callback, bool recursive = false)