]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/file.h
Rework exceptions for IO
[libs/core.git] / source / io / file.h
index 05aaf9565a08653f278773e010fee4acb6361779..47111609e8adb238f5bfef24132f81c6e8a9b8a2 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_IO_FILE_H_
 #define MSP_IO_FILE_H_
 
+#include <stdexcept>
 #include <string>
 #include "base.h"
 #include "buffered.h"
 namespace Msp {
 namespace IO {
 
+class file_not_found: public std::runtime_error
+{
+public:
+       file_not_found(const std::string &fn): std::runtime_error(fn) { }
+};
+
+
 /**
 A class for reading and writing files.