Actions
Bug #4959
openoperator<<(std::ostream&, const Data&) may throw
Start date:
Due date:
% Done:
0%
Estimated time:
Description
ndn::Data d;
std::cout << d;
results in:
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<ndn::Signature::Error> >: Signature is invalid
I think it's quite unexpected that an operator<<
throws in this case, or in any other case where the object being printed is not valid according to the network protocol, but doesn't violate any class invariants (if it did, the constructor should have thrown). Instead, I'd expect operator<<
to print "invalid signature" and not throw any exceptions.
Actions