Throwing exception in ProducerBase::onRegisterFailed has no effect
The method ProducerBase::onRegisterFailed throws an exception:
NDN_LOG_ERROR("ProduerBase::onRegisterFailed " << prefix << " " << msg); BOOST_THROW_EXCEPTION(Error(msg));
But onRegisterFailed is called from a library callback which handles a timeout or receives an error packet for the registration request. Then library will not pass the exception to the application, so throwing the exception in onRegisterFailed has no effect. PSync already logs the exception, which is the correct behavior. The code to throw the exception can be removed.
This is a low priority comment. Feel free to ignore.
#1 Updated by Jeff Thompson 2 months ago
... throwing the exception should have no effect, except that the unit test MultipleNodesSimulataneousPublish fails if the code that throws the exception is removed:
I'll repeat my claim that it does not make sense for a callback which is invoked by the system to try to communicate to the application by throwing an exception.