fix for error messages

This commit is contained in:
Volker Fischer 2008-07-13 18:43:40 +00:00
parent 660f4d5705
commit 2ce29103c6

View file

@ -23,6 +23,7 @@
\******************************************************************************/
#include <qapplication.h>
#include <qmessagebox.h>
#include <iostream>
#include "global.h"
#include "llconclientdlg.h"
@ -112,6 +113,8 @@ cerr << "logging ";
extern int qInitResources();
qInitResources();
try
{
if ( bIsClient )
{
// client
@ -169,6 +172,20 @@ cerr << "logging ";
app.exec();
}
}
}
catch ( CGenErr generr )
{
// show generic error
if ( bUseGUI )
{
QMessageBox::critical ( 0, APP_NAME, generr.strError, "Quit", 0 );
}
else
{
qDebug() << generr.strError;
}
}
return 0;
}