X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fapplication.cpp;h=3a663dbb63b77fa85b4cf8ac9546d7543d6d7f98;hp=a49802350f2f7d655125d8ab0480d9e41370c72a;hb=55a79fbe96a87183fa4e11049eb161943636b1dd;hpb=0fa00d18f607f329d2b2a979e1d4339e233817fa diff --git a/source/core/application.cpp b/source/core/application.cpp index a498023..3a663db 100644 --- a/source/core/application.cpp +++ b/source/core/application.cpp @@ -6,6 +6,7 @@ Distributed under the LGPL */ #include #include +#include "../debug/backtrace.h" #include "../debug/demangle.h" #include "../time/units.h" #include "../time/utils.h" @@ -60,6 +61,21 @@ int Application::run(int argc, char **argv) cerr<<"An uncaught exception occurred.\n"; cerr<<" type: "<(&e); + if(exc && !exc->get_backtrace().get_frames().empty()) + { + cerr<<" backtrace:\n"; + const Debug::Backtrace::FrameSeq &frames=exc->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'; + } + } + delete app_; return 124; }