X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fapplication.cpp;h=0ef3443e8eac4fab7173b15df42c9cd1360b4e88;hp=7e92dbdf3d552574fbb279b17abc7bf56edfbec2;hb=015d9ccbae576049e392b4dbc3017e00d8df3c49;hpb=fe77fc6b869a71bf94d501a0762579f4ddbc5094 diff --git a/source/core/application.cpp b/source/core/application.cpp index 7e92dbd..0ef3443 100644 --- a/source/core/application.cpp +++ b/source/core/application.cpp @@ -1,4 +1,5 @@ -/* +/* $Id$ + This file is part of libmspcore Copyright © 2006 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL @@ -6,6 +7,7 @@ Distributed under the LGPL #include #include #include "../time/units.h" +#include "../time/utils.h" #include "application.h" #include "error.h" @@ -46,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: "<