From: Mikko Rasa Date: Thu, 4 Oct 2007 20:24:51 +0000 (+0000) Subject: Rename error.h to except.h X-Git-Tag: io-1.0~11 X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=commitdiff_plain;h=c8a3f4ae89bc415bfbd877b3f4c3605ac3cf4010;hp=c0861d1f8e3869f058bc8b152cd35a08e5b03e73 Rename error.h to except.h Get rid of the largely unused IO::Exception --- diff --git a/source/buffered.cpp b/source/buffered.cpp index 4cd5cb4..4327413 100644 --- a/source/buffered.cpp +++ b/source/buffered.cpp @@ -5,7 +5,7 @@ Copyright © 2007 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ #include "buffered.h" -#include "error.h" +#include "except.h" using namespace std; diff --git a/source/error.h b/source/error.h deleted file mode 100644 index 8ebcf38..0000000 --- a/source/error.h +++ /dev/null @@ -1,34 +0,0 @@ -/* $Id$ - -This file is part of libmspio -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ -#ifndef MSP_IO_ERROR_H_ -#define MSP_IO_ERROR_H_ - -#include - -namespace Msp { -namespace IO { - -class Exception: public Msp::Exception -{ -public: - Exception(const std::string &w_): Msp::Exception(w_) { } -}; - -class FileNotFound: public Exception -{ -public: - FileNotFound(const std::string &w_, const std::string &f): Exception(w_), filename(f) { } - const std::string &get_filename() { return filename; } - ~FileNotFound() throw() { } -private: - std::string filename; -}; - -} // namespace IO -} // namespace Msp - -#endif diff --git a/source/except.h b/source/except.h new file mode 100644 index 0000000..b277b8d --- /dev/null +++ b/source/except.h @@ -0,0 +1,28 @@ +/* $Id$ + +This file is part of libmspio +Copyright © 2007 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ +#ifndef MSP_IO_EXCEPT_H_ +#define MSP_IO_EXCEPT_H_ + +#include + +namespace Msp { +namespace IO { + +class FileNotFound: public Exception +{ +public: + FileNotFound(const std::string &w_, const std::string &f): Exception(w_), filename(f) { } + const std::string &get_filename() { return filename; } + ~FileNotFound() throw() { } +private: + std::string filename; +}; + +} // namespace IO +} // namespace Msp + +#endif diff --git a/source/file.cpp b/source/file.cpp index 9b1e433..a22b832 100644 --- a/source/file.cpp +++ b/source/file.cpp @@ -10,7 +10,7 @@ Distributed under the LGPL #include #endif #include -#include "error.h" +#include "except.h" #include "file.h" using namespace std; diff --git a/source/poll.cpp b/source/poll.cpp index f8f6c51..3b349b4 100644 --- a/source/poll.cpp +++ b/source/poll.cpp @@ -7,7 +7,7 @@ Distributed under the LGPL #include #include #include -#include "error.h" +#include "except.h" #include "base.h" #include "poll.h" diff --git a/source/seek.cpp b/source/seek.cpp index f2d381e..88ba033 100644 --- a/source/seek.cpp +++ b/source/seek.cpp @@ -7,7 +7,7 @@ Distributed under the LGPL #ifdef WIN32 #include #endif -#include +#include "except.h" #include "seek.h" namespace Msp {