--- /dev/null
+#include <windows.h>
+#include <typeinfo>
+#include <msp/debug/demangle.h>
+#include "errordialog.h"
+
+using namespace std;
+
+namespace Msp {
+namespace Graphics {
+
+bool ErrorDialog::report_uncaught_exception(const exception &e) const
+{
+ string msg = Debug::demangle(typeid(e).name())+":\n"+e.what();
+ MessageBoxA(0, msg.c_str(), "Uncaught exception", MB_OK|MB_ICONERROR);
+ return false;
+}
+
+} // namespace Graphics
+} // namespace Msp