From 72c0002b45215466e06cd901fe95d9493d659ab2 Mon Sep 17 00:00:00 2001 From: Charles Milette Date: Sat, 19 May 2018 19:18:26 -0400 Subject: Catch C++ exceptions by const reference Fixes #2277 --- api/logic/meta/BaseEntity.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/logic/meta') diff --git a/api/logic/meta/BaseEntity.cpp b/api/logic/meta/BaseEntity.cpp index 5c2339cb..342f676c 100644 --- a/api/logic/meta/BaseEntity.cpp +++ b/api/logic/meta/BaseEntity.cpp @@ -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. -- cgit