Przeglądaj źródła

HPCC-19308 Cleanly report an error if a child query is called too early

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 7 lat temu
rodzic
commit
349f19ac6d
2 zmienionych plików z 9 dodań i 1 usunięć
  1. 1 1
      ecl/eclagent/eclagent.ipp
  2. 8 0
      ecl/eclagent/eclgraph.cpp

+ 1 - 1
ecl/eclagent/eclagent.ipp

@@ -740,7 +740,7 @@ public:
     void updateProgress(IAgentContext & agent);
     void updateProgress(IStatisticGatherer &progress);
 
-    void ready() { if (!alreadyUpdated) activity->ready(); }
+    void ready();
     void execute() { if (!alreadyUpdated) activity->execute(); }
     void stop() { if (!alreadyUpdated) activity->stop(); }
 

+ 8 - 0
ecl/eclagent/eclgraph.cpp

@@ -725,6 +725,14 @@ void EclGraphElement::updateProgress(IStatisticGatherer &progress)
         activity->updateProgress(progress);
 }
 
+void EclGraphElement::ready()
+{
+    if (!activity)
+        throw makeHThorException(kind, id, subgraph->id, 99, "Attempt to execute an activity that has not been created");
+    if (!alreadyUpdated)
+        activity->ready();
+}
+
 IHThorException * EclGraphElement::makeWrappedException(IException * e)
 {
     throw makeHThorException(kind, id, subgraph->id, e);