]> git.tdb.fi Git - libs/gui.git/blob - source/graphics/windows/errordialog.cpp
Return true to indicate the error was handled
[libs/gui.git] / source / graphics / windows / errordialog.cpp
1 #include <windows.h>
2 #include <typeinfo>
3 #include <msp/debug/demangle.h>
4 #include "errordialog.h"
5
6 using namespace std;
7
8 namespace Msp {
9 namespace Graphics {
10
11 bool ErrorDialog::report_uncaught_exception(const exception &e) const
12 {
13         string msg = Debug::demangle(typeid(e).name())+":\n"+e.what();
14         MessageBoxA(0, msg.c_str(), "Uncaught exception", MB_OK|MB_ICONERROR);
15         return true;
16 }
17
18 } // namespace Graphics
19 } // namespace Msp