]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/application.cpp
Move most platform-specific code into overlay directories
[libs/core.git] / source / core / application.cpp
index 51f013e72c3cb5876429035d2604c95eb1a1f578..36621e92ae99af9b74a2726263fd3b8176cbd020 100644 (file)
@@ -1,9 +1,4 @@
-#ifdef WIN32
-#include <windows.h>
-#endif
 #include <signal.h>
-#include <typeinfo>
-#include <msp/debug/demangle.h>
 #include <msp/io/print.h>
 #include "application.h"
 #include "getopt.h"
@@ -68,14 +63,7 @@ int Application::run(int argc, char **argv, void *data)
        {
                delete app_;
 
-#ifdef WIN32
-               string msg = Debug::demangle(typeid(e).name())+":\n"+e.what();
-               MessageBoxA(0, msg.c_str(), "Uncaught exception", MB_OK|MB_ICONERROR);
-#else
-               IO::print(IO::cerr, "An uncaught exception occurred.\n");
-               IO::print(IO::cerr, "  type:   %s\n", Debug::demangle(typeid(e).name()));
-               IO::print(IO::cerr, "  what(): %s\n", e.what());
-#endif
+               display_exception(e);
 
                return 124;
        }