Project

General

Profile

Actions

Bug #4959

open

operator<<(std::ostream&, const Data&) may throw

Added by Davide Pesavento almost 5 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Category:
Base
Target version:
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 #1

Updated by Davide Pesavento over 4 years ago

  • Target version changed from v0.7 to 0.8.0
Actions #2

Updated by Davide Pesavento about 2 years ago

  • Target version changed from 0.8.0 to 0.8.1
Actions #3

Updated by Davide Pesavento over 1 year ago

  • Target version changed from 0.8.1 to 0.9.0
Actions

Also available in: Atom PDF