]> git.tdb.fi Git - libs/core.git/blob - source/debug/errorreporter.h
Add a NonCopyable utility base class
[libs/core.git] / source / debug / errorreporter.h
1 #ifndef MSP_DEBUG_ERRORREPORTER_H_
2 #define MSP_DEBUG_ERRORREPORTER_H_
3
4 #include <stdexcept>
5
6 namespace Msp {
7 namespace Debug {
8
9 class ErrorReporter
10 {
11 private:
12         ErrorReporter *prev;
13
14         static ErrorReporter *current;
15
16 protected:
17         ErrorReporter();
18 public:
19         virtual ~ErrorReporter();
20
21         static const ErrorReporter *get_current() { return current; }
22
23         virtual bool report_uncaught_exception(const std::exception &) const = 0;
24 };
25
26 } // namespace Debug
27 } // namespace Msp
28
29 #endif