]> git.tdb.fi Git - libs/core.git/blob - source/core/systemerror.h
Mark overridden virtual functions as such
[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 m_code;
13
14 public:
15         system_error(const std::string &, int = -1);
16         system_error(const std::string &, const std::string &);
17         ~system_error() throw() override = default;
18
19         int code() const throw() { return m_code; }
20
21 private:
22         static std::string get_message(int);
23 };
24
25 } // namespace Msp
26
27 #endif