]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/buffered.cpp
Use pimpl in Poller
[libs/core.git] / source / io / buffered.cpp
index f53d2fc23fa49e38ede87da0188b40d3cfeadb50..5dbd49463fc2666a39019036c4882231b73b653d 100644 (file)
@@ -1,6 +1,6 @@
 #include <cstring>
+#include <stdexcept>
 #include "buffered.h"
-#include "except.h"
 
 using namespace std;
 
@@ -40,10 +40,10 @@ void Buffered::flush()
                {
                        unsigned len = below.write(begin, used);
 
-                       begin=end = buf;
+                       begin = end = buf;
 
                        if(len<used)
-                               throw Exception("Couldn't flush all data");
+                               throw runtime_error("Couldn't flush all data");
                }
        }
        else if(cur_op==M_READ)
@@ -181,7 +181,7 @@ unsigned Buffered::get_current_size() const
 
 Handle Buffered::get_event_handle()
 {
-       throw Exception("Buffered doesn't support events");
+       throw logic_error("Buffered doesn't support events");
 }
 
 } // namespace IO