From: Mikko Rasa Date: Sat, 7 Jul 2007 17:51:16 +0000 (+0000) Subject: Trap and explain uncaught exceptions X-Git-Tag: 1.0~24 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=015d9ccbae576049e392b4dbc3017e00d8df3c49;p=libs%2Fcore.git Trap and explain uncaught exceptions --- diff --git a/source/core/application.cpp b/source/core/application.cpp index 0e93a9c..0ef3443 100644 --- a/source/core/application.cpp +++ b/source/core/application.cpp @@ -48,9 +48,20 @@ int Application::run(int argc, char **argv) return 1; } - int result=app_->main(); - delete app_; - return result; + try + { + int result=app_->main(); + delete app_; + return result; + } + catch(const exception &e) + { + cerr<<"An uncaught exception occurred.\n"; + cerr<<" type: "<