]> git.tdb.fi Git - libs/core.git/blobdiff - source/debug/errorreporter.cpp
Redesign uncaught exception handling to allow external reporters
[libs/core.git] / source / debug / errorreporter.cpp
diff --git a/source/debug/errorreporter.cpp b/source/debug/errorreporter.cpp
new file mode 100644 (file)
index 0000000..d4d51bc
--- /dev/null
@@ -0,0 +1,20 @@
+#include "errorreporter.h"
+
+namespace Msp {
+namespace Debug {
+
+ErrorReporter *ErrorReporter::current = 0;
+
+ErrorReporter::ErrorReporter():
+       prev(current)
+{
+       current = this;
+}
+
+ErrorReporter::~ErrorReporter()
+{
+       current = prev;
+}
+
+} // namespace Debug
+} // namespace Msp