X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fapplication.cpp;h=82134df90af16cba7fcab8457819c9cad5a55902;hb=bddffe4de070f28bcc1def8bfc5f86dc385aa81f;hp=bcb7e3de49e2cb0b3058844f2559f336cfdc5a50;hpb=20e1beb546c26eae3b1a61ab2051108a7dca221f;p=libs%2Fcore.git diff --git a/source/core/application.cpp b/source/core/application.cpp index bcb7e3d..82134df 100644 --- a/source/core/application.cpp +++ b/source/core/application.cpp @@ -62,6 +62,12 @@ int Application::run(int argc, char **argv, void *data) } catch(const exception &e) { + delete app_; + +#ifdef WIN32 + string msg=Debug::demangle(typeid(e).name())+":\n"+e.what(); + MessageBox(0, msg.c_str(), "Uncaught exception", MB_OK|MB_ICONERROR); +#else cerr<<"An uncaught exception occurred.\n"; cerr<<" type: "<get_backtrace().get_frames(); for(Debug::Backtrace::FrameSeq::const_iterator i=frames.begin(); i!=frames.end(); ++i) - { - cerr<<" "<address; - if(!i->symbol.empty()) - cerr<<" in "<symbol; - cerr<<" from "<file<<'\n'; - } + cerr<<" "<<*i<<'\n'; } +#endif - delete app_; return 124; } }