[Boost-bugs] [Boost C++ Libraries] #3311: Unintentionally unthrown exceptions

Subject: [Boost-bugs] [Boost C++ Libraries] #3311: Unintentionally unthrown exceptions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-08-03 09:03:57


#3311: Unintentionally unthrown exceptions
-----------------------------------------------------------------------------+
 Reporter: Gareth Sylvester-Bradley <gareth.sylvester-bradley@…> | Owner: turkanis
     Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: iostreams
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: |
-----------------------------------------------------------------------------+
 In several places, Boost.Iostreams creates exception objects but doesn't
 throw them, which I assume is unintentional, and appears to have the
 potential to result in incorrect behaviour.

 Using bad_seek() and bad_write() -

 https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L163
 https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L184
 https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L188
 https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L275
 https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L296
 https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L300

 Using BOOST_IOSTREAMS_FAILURE() directly -

 https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/stream_buffer.hpp#L103

 These all seem to be present in trunk as well...

 The patch seems trivial; introduce "throw" in all these places...

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3311>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC