Catch C++ exceptions by const reference

Fixes #2277
This commit is contained in:
Charles Milette
2018-05-19 19:18:26 -04:00
parent b9fd381eee
commit 72c0002b45
22 changed files with 36 additions and 38 deletions

View File

@ -479,7 +479,7 @@ void ExportInstanceDialog::savePackIgnore()
{
FS::write(filename, data);
}
catch (Exception & e)
catch (const Exception &e)
{
qWarning() << e.cause();
}

View File

@ -135,7 +135,7 @@ QString reprocessCommits(QByteArray json)
result += QObject::tr("<p>You can <a href=\"%1\">look at the changes on github</a>.</p>").arg(diff_url);
return result;
}
catch (JSONValidationError & e)
catch (const JSONValidationError &e)
{
qWarning() << "Got an unparseable commit log from github:" << e.what();
qDebug() << json;