]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/buffered.cpp
Separate event-related stuff from Base
[libs/core.git] / source / io / buffered.cpp
index f53d2fc23fa49e38ede87da0188b40d3cfeadb50..be4c8d47c8bc263d516846c4053018b9696f2824 100644 (file)
@@ -1,6 +1,7 @@
 #include <cstring>
+#include <stdexcept>
 #include "buffered.h"
-#include "except.h"
+#include "handle.h"
 
 using namespace std;
 
@@ -40,10 +41,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)
@@ -179,10 +180,5 @@ unsigned Buffered::get_current_size() const
        return end-begin;
 }
 
-Handle Buffered::get_event_handle()
-{
-       throw Exception("Buffered doesn't support events");
-}
-
 } // namespace IO
 } // namespace Msp