From 1c82a53e74a7a3be9c0d6447ed9026901a93afaf Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 4 Apr 2018 21:53:26 +0300 Subject: [PATCH] Modeling: Catch exceptions by reference Detected by GCC8. Change-Id: I478e835a49beaa2cd6f07650b2e8c3726979018d Reviewed-by: Jochen Becher Reviewed-by: Orgad Shaneh --- src/libs/modelinglib/qmt/config/configcontroller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/modelinglib/qmt/config/configcontroller.cpp b/src/libs/modelinglib/qmt/config/configcontroller.cpp index c7b9a783557..78f567aa29f 100644 --- a/src/libs/modelinglib/qmt/config/configcontroller.cpp +++ b/src/libs/modelinglib/qmt/config/configcontroller.cpp @@ -100,10 +100,10 @@ void ConfigController::readStereotypeDefinitions(const QString &path) source.setText(text); try { parser.parse(&source); - } catch (StereotypeDefinitionParserError x) { + } catch (const StereotypeDefinitionParserError &x) { // TODO add error handling qDebug() << x.errorMessage() << "in line" << x.sourcePos().lineNumber(); - } catch (TextScannerError x) { + } catch (const TextScannerError &x) { // TODO add error handling qDebug() << x.errorMessage() << "in line" << x.sourcePos().lineNumber(); } catch (...) {