catch errors on sound card starting in main dialog and show error message without the need to terminate the software immediately (as it was before)
This commit is contained in:
parent
c549ae90f0
commit
bb3404b21c
1 changed files with 511 additions and 495 deletions
|
@ -338,13 +338,29 @@ void CLlconClientDlg::OnConnectDisconBut()
|
|||
// set address and check if address is valid
|
||||
if ( pClient->SetServerAddr ( LineEditServerAddr->currentText() ) )
|
||||
{
|
||||
pClient->Start();
|
||||
bool bStartOk = true;
|
||||
|
||||
try
|
||||
{
|
||||
pClient->Start();
|
||||
}
|
||||
|
||||
catch ( CGenErr generr )
|
||||
{
|
||||
QMessageBox::critical (
|
||||
this, APP_NAME, generr.GetErrorText(), "Close", 0 );
|
||||
|
||||
bStartOk = false;
|
||||
}
|
||||
|
||||
if ( bStartOk )
|
||||
{
|
||||
PushButtonConnect->setText ( CON_BUT_DISCONNECTTEXT );
|
||||
|
||||
// start timer for level meter bar
|
||||
TimerSigMet.start ( LEVELMETER_UPDATE_TIME );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Restart timer to ensure that the text is visible at
|
||||
|
|
Loading…
Reference in a new issue