fix for error messages
This commit is contained in:
parent
660f4d5705
commit
2ce29103c6
1 changed files with 62 additions and 45 deletions
17
src/main.cpp
17
src/main.cpp
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue