phrocker commented on a change in pull request #683: MINIFICPP-1087 - Proper 
handling of errors during onSchedule calls
URL: https://github.com/apache/nifi-minifi-cpp/pull/683#discussion_r350803152
 
 

 ##########
 File path: libminifi/src/core/ProcessGroup.cpp
 ##########
 @@ -156,6 +168,49 @@ void ProcessGroup::startProcessing(const 
std::shared_ptr<TimerDrivenSchedulingAg
           break;
       }
     }
+    catch (const std::exception &e) {
+      logger_->log_error("Failed to start processor %s (%s): %s", 
processor->getUUIDStr(), processor->getName(), e.what());
+      failed_processors.insert(processor);
+    }
+    catch (...) {
+      logger_->log_error("Failed to start processor %s (%s)", 
processor->getUUIDStr(), processor->getName());
+      failed_processors.insert(processor);
+    }
+  }
+  failed_processors_ = std::move(failed_processors);
+
+  for (auto& processor : failed_processors_) {
+    try {
+      processor->onUnSchedule();
 
 Review comment:
   why not call notifystop here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to