Boost logo

Boost-Commit :

From: technews_at_[hidden]
Date: 2007-12-29 23:35:26


Author: turkanis
Date: 2007-12-29 23:35:26 EST (Sat, 29 Dec 2007)
New Revision: 42358
URL: http://svn.boost.org/trac/boost/changeset/42358

Log:
replaced exception constructing statements with statements that actually throw the exception
Text files modified:
   branches/iostreams_dev/boost/iostreams/detail/adapter/direct_adapter.hpp | 6 +++---
   branches/iostreams_dev/boost/iostreams/detail/adapter/range_adapter.hpp | 6 +++---
   2 files changed, 6 insertions(+), 6 deletions(-)

Modified: branches/iostreams_dev/boost/iostreams/detail/adapter/direct_adapter.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/detail/adapter/direct_adapter.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/detail/adapter/direct_adapter.hpp 2007-12-29 23:35:26 EST (Sat, 29 Dec 2007)
@@ -222,7 +222,7 @@
     pointers& get = ptrs_.first();
     pointers& put = ptrs_.second();
     if (way == BOOST_IOS::cur && get.ptr != put.ptr)
- bad_seek();
+ throw bad_seek();
     ptrdiff_t next = 0;
     if ((which & BOOST_IOS::in) || !is_double::value) {
         if (way == BOOST_IOS::beg)
@@ -234,7 +234,7 @@
         if (next >= 0 && next < get.end - get.beg)
             get.ptr = get.beg + next;
         else
- bad_seek();
+ throw bad_seek();
     }
     if ((which & BOOST_IOS::out) && is_double::value) {
         if (way == BOOST_IOS::beg)
@@ -246,7 +246,7 @@
         if (next >= 0 && next < put.end - put.beg)
             put.ptr = put.beg + next;
         else
- bad_seek();
+ throw bad_seek();
     }
     return offset_to_position(next);
 }

Modified: branches/iostreams_dev/boost/iostreams/detail/adapter/range_adapter.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/detail/adapter/range_adapter.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/detail/adapter/range_adapter.hpp 2007-12-29 23:35:26 EST (Sat, 29 Dec 2007)
@@ -155,18 +155,18 @@
         using namespace std;
         switch (way) {
         case BOOST_IOS::beg:
- if (off > last - first || off < 0) bad_seek();
+ if (off > last - first || off < 0) throw bad_seek();
             cur = first + off;
             break;
         case BOOST_IOS::cur:
             {
                 std::ptrdiff_t newoff = cur - first + off;
- if (newoff > last - first || newoff < 0) bad_seek();
+ if (newoff > last - first || newoff < 0) throw bad_seek();
                 cur += off;
                 break;
             }
         case BOOST_IOS::end:
- if (last - first + off < 0 || off > 0) bad_seek();
+ if (last - first + off < 0 || off > 0) throw bad_seek();
             cur = last + off;
             break;
         default:


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk