]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/slice.cpp
Add new exception classes for some common errors
[libs/core.git] / source / io / slice.cpp
index 535deae1184bfdf7900375652e4faf8bede8473d..98013b60c4e4c5c1c086e62d621c8224e2de522f 100644 (file)
@@ -1,4 +1,4 @@
-#include <stdexcept>
+#include <msp/core/except.h>
 #include "slice.h"
 
 using namespace std;
@@ -21,12 +21,12 @@ Slice::Slice(Seekable &b, SeekOffset s, SeekOffset l):
 
 void Slice::set_block(bool)
 {
-       throw logic_error("Slice::set_block");
+       throw unsupported("Slice::set_block");
 }
 
 void Slice::set_inherit(bool)
 {
-       throw logic_error("Slice::set_inherit");
+       throw unsupported("Slice::set_inherit");
 }
 
 void Slice::flush()
@@ -108,7 +108,7 @@ int Slice::get()
 
 const Handle &Slice::get_handle(Mode)
 {
-       throw logic_error("Slice::get_handle");
+       throw unsupported("Slice::get_handle");
 }
 
 SeekOffset Slice::seek(SeekOffset off, SeekType type)