Merge pull request #395 from stweil/master

Catch a CGenErr by const reference rather than by value
This commit is contained in:
Volker Fischer 2020-06-24 17:19:47 +02:00 committed by GitHub
commit faef894057
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -1079,7 +1079,7 @@ void CClientDlg::Connect ( const QString& strSelectedAddress,
}
}
catch ( CGenErr generr )
catch ( const CGenErr& generr )
{
// show error message and return the function
QMessageBox::critical ( this, APP_NAME, generr.GetErrorText(), "Close", nullptr );

View File

@ -282,7 +282,7 @@ public:
CGenErr ( QString strNewErrorMsg, QString strNewErrorType = "" ) :
strErrorMsg ( strNewErrorMsg ), strErrorType ( strNewErrorType ) {}
QString GetErrorText()
QString GetErrorText() const
{
// return formatted error text
if ( strErrorType.isEmpty() )

View File

@ -706,7 +706,7 @@ int main ( int argc, char** argv )
}
}
catch ( CGenErr generr )
catch ( const CGenErr& generr )
{
// show generic error
#ifndef HEADLESS