X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fsystemerror.h;fp=source%2Fcore%2Fsystemerror.h;h=4b7493d47a5409bfb7902c12b9d997bf7b3cd5ee;hb=6a38983c19fe78753962288e206c5817ad595448;hp=0000000000000000000000000000000000000000;hpb=5a9200b48b8455185b0fcbd55c69deca88a1184c;p=libs%2Fcore.git diff --git a/source/core/systemerror.h b/source/core/systemerror.h new file mode 100644 index 0000000..4b7493d --- /dev/null +++ b/source/core/systemerror.h @@ -0,0 +1,26 @@ +#ifndef MSP_CORE_SYSTEMERROR_H_ +#define MSP_CORE_SYSTEMERROR_H_ + +#include +#include + +namespace Msp { + +class system_error: public std::runtime_error +{ +private: + int code_; + +public: + system_error(const std::string &, int = -1); + virtual ~system_error() throw() { } + + int code() const throw() { return code_; } + +private: + static std::string get_message(int); +}; + +} // namespace Msp + +#endif