Project

General

Profile

Actions

Task #4836

open

Throwing exception in ProducerBase::onRegisterFailed has no effect

Added by Anonymous about 5 years ago. Updated about 5 years ago.

Status:
New
Priority:
Low
Assignee:
-
Target version:
-
Start date:
02/06/2019
Due date:
% Done:

0%

Estimated time:

Description

The method ProducerBase::onRegisterFailed throws an exception:
https://github.com/named-data/PSync/blob/0cf4b600e91455ee07c38eb22876aa6b653bc14b/PSync/producer-base.cpp#L147

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.

Actions

Also available in: Atom PDF