Project

General

Profile

Actions

Bug #4959

open

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

Added by Davide Pesavento over 5 years ago. Updated 6 months 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 about 5 years ago

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

Updated by Davide Pesavento almost 3 years ago

  • Target version changed from 0.8.0 to 0.8.1
Actions #3

Updated by Davide Pesavento about 2 years ago

  • Target version changed from 0.8.1 to 0.9.0
Actions #4

Updated by Davide Pesavento 6 months ago

  • Target version deleted (0.9.0)
Actions

Also available in: Atom PDF