]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/windows/application.cpp
Move most platform-specific code into overlay directories
[libs/core.git] / source / core / windows / application.cpp
diff --git a/source/core/windows/application.cpp b/source/core/windows/application.cpp
new file mode 100644 (file)
index 0000000..ed8702a
--- /dev/null
@@ -0,0 +1,16 @@
+#include <windows.h>
+#include <typeinfo>
+#include <msp/debug/demangle.h>
+#include "application.h"
+
+using namespace std;
+
+namespace Msp {
+
+void Application::display_exception(const exception &e)
+{
+       string msg = Debug::demangle(typeid(e).name())+":\n"+e.what();
+       MessageBoxA(0, msg.c_str(), "Uncaught exception", MB_OK|MB_ICONERROR);
+}
+
+} // namespace Msp