Mercurial > hg > forks > UniversalIndentGUI
changeset 756:5a0ece4b81b4
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
author | thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282> |
---|---|
date | Mon, 11 Apr 2011 20:32:52 +0000 |
parents | 302411a51c00 |
children | d690e8f38122 |
files | src/main.cpp |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <QApplication> #include <QTextCodec> +#include <QDebug> #include <string> #include <iostream> @@ -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();