Browse Source

Merge pull request #8329 from wangkx/h15114a

HPCC-15114 Add file name to exception when iterateFilteredFiles

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 years ago
parent
commit
4b9de89efc
1 changed files with 14 additions and 3 deletions
  1. 14 3
      dali/base/dadfs.cpp

+ 14 - 3
dali/base/dadfs.cpp

@@ -8788,9 +8788,20 @@ public:
         ForEachItemIn(i,filters)
         {
             CDFUSFFilter &filter = filters.item(i);
-            bool match = filter.checkFilter(file);
-            if (!match)
-                return match;
+            const char* attrPath = filter.getAttrPath();
+            try
+            {
+                if (!filter.checkFilter(file))
+                    return false;
+            }
+            catch (IException *e)
+            {
+                VStringBuffer msg("Failed to check filter %s for %s: ", attrPath, name);
+                int code = e->errorCode();
+                e->errorMessage(msg);
+                e->Release();
+                throw MakeStringException(code, "%s", msg.str());
+            }
         }
         return true;
     }