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

@ -56,7 +56,7 @@ public: /* methods */
m_entity->parse(Json::requireObject(Json::requireDocument(data, fname), fname));
return true;
}
catch (Exception &e)
catch (const Exception &e)
{
qWarning() << "Unable to parse response:" << e.cause();
return false;
@ -90,7 +90,7 @@ bool Meta::BaseEntity::loadLocalFile()
parse(Json::requireObject(Json::requireDocument(fname, fname), fname));
return true;
}
catch (Exception &e)
catch (const Exception &e)
{
qDebug() << QString("Unable to parse file %1: %2").arg(fname, e.cause());
// just make sure it's gone and we never consider it again.