]> git.tdb.fi Git - libs/gui.git/blob - source/graphics/cocoa/errordialog.cpp
Implement graphical reporting for uncaught exceptions
[libs/gui.git] / source / graphics / cocoa / errordialog.cpp
1 #include "errordialog.h"
2
3 using namespace std;
4
5 extern "C" void run_alert(const char *, const char *);
6
7 namespace Msp {
8 namespace Graphics {
9
10 bool ErrorDialog::report_uncaught_exception(const exception &e) const
11 {
12         if(Application::get_data())
13         {
14                 string type = Debug::demangle(typeid(e).name());
15                 run_alert(type.c_str(), e.what());
16                 return true;
17         }
18         return false;
19 }
20
21 } // namespace Graphics
22 } // namespace Msp