]> git.tdb.fi Git - libs/core.git/blob - source/core/systemerror.h
4b7493d47a5409bfb7902c12b9d997bf7b3cd5ee
[libs/core.git] / source / core / systemerror.h
1 #ifndef MSP_CORE_SYSTEMERROR_H_
2 #define MSP_CORE_SYSTEMERROR_H_
3
4 #include <stdexcept>
5 #include <string>
6
7 namespace Msp {
8
9 class system_error: public std::runtime_error
10 {
11 private:
12         int code_;
13
14 public:
15         system_error(const std::string &, int = -1);
16         virtual ~system_error() throw() { }
17
18         int code() const throw() { return code_; }
19
20 private:
21         static std::string get_message(int);
22 };
23
24 } // namespace Msp
25
26 #endif