adamdebreceni commented on a change in pull request #943:
URL: https://github.com/apache/nifi-minifi-cpp/pull/943#discussion_r532575479
##########
File path: extensions/standard-processors/processors/GetTCP.h
##########
@@ -212,29 +207,29 @@ class GetTCP : public core::Processor, public
state::response::MetricsNodeSource
* @param sessionFactory process session factory that is used when creating
* ProcessSession objects.
*/
- virtual void onSchedule(const std::shared_ptr<core::ProcessContext>
&processContext, const std::shared_ptr<core::ProcessSessionFactory>
&sessionFactory);
+ void onSchedule(const std::shared_ptr<core::ProcessContext> &processContext,
const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) override;
- void onSchedule(core::ProcessContext *processContext,
core::ProcessSessionFactory *sessionFactory) {
- throw std::exception();
+ void onSchedule(core::ProcessContext *processContext,
core::ProcessSessionFactory *sessionFactory) override {
+ throw std::logic_error{"GetTCP::onSchedule(ProcessContext*,
ProcessSessionFactory*) is unimplemented"};
}
/**
* Execution trigger for the GetTCP Processor
* @param context processor context
* @param session processor session reference.
*/
- virtual void onTrigger(const std::shared_ptr<core::ProcessContext> &context,
const std::shared_ptr<core::ProcessSession> &session);
+ void onTrigger(const std::shared_ptr<core::ProcessContext> &context, const
std::shared_ptr<core::ProcessSession> &session) override;
- virtual void onTrigger(core::ProcessContext *context, core::ProcessSession
*session) {
- throw std::exception();
+ void onTrigger(core::ProcessContext *context, core::ProcessSession *session)
override {
+ throw std::logic_error{"GetTCP::onTrigger(ProcessContext*,
ProcessSession*) is unimplemented"};
Review comment:
I agree that the symmetry is nice, I think we can leave it be for now,
and then take a look at these (not just this processor but others as well) in a
separate PR to override the raw-pointer-taking method wherever possible
----------------------------------------------------------------
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:
[email protected]