浏览代码

Don't let it blow

Piotr Czajkowski 3 年之前
父节点
当前提交
e4955c55af
共有 1 个文件被更改,包括 8 次插入1 次删除
  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)