# HG changeset patch # User thomas_-_s # Date 1302553972 0 # Node ID 5a0ece4b81b4b00f8be8b8884d75e93b352d091c # Parent 302411a51c008e63571c92030b114f80166bcd25 main.cpp: Added a try-catch around the application execution call. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@1033 59b1889a-e5ac-428c-b0c7-476e01d41282 diff -r 302411a51c00 -r 5a0ece4b81b4 src/main.cpp --- a/src/main.cpp Mon Apr 11 20:27:30 2011 +0000 +++ b/src/main.cpp Mon Apr 11 20:32:52 2011 +0000 @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -248,7 +249,12 @@ server.startServer(); } - returnValue = app.exec(); + try { + returnValue = app.exec(); + } + catch (std::exception &ex) { + qCritical() << __LINE__ << " " << __FUNCTION__ << ": Something went terribly wrong:" << ex.what(); + } if ( startAsPlugin || startAsServer ) server.stopServer();