]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/buffered.cpp
Rework exceptions for IO
[libs/core.git] / source / io / buffered.cpp
index f53d2fc23fa49e38ede87da0188b40d3cfeadb50..f72522361b1d013d8f79d21fedefff910d0b1c1c 100644 (file)
@@ -1,6 +1,6 @@
 #include <cstring>
+#include <stdexcept>
 #include "buffered.h"
-#include "except.h"
 
 using namespace std;
 
@@ -43,7 +43,7 @@ void Buffered::flush()
                        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