Browse Source

Don't let it blow

Piotr Czajkowski 2 years ago
parent
commit
e4955c55af
1 changed files with 8 additions and 1 deletions
  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)