Modeling: Catch exceptions by reference

Detected by GCC8.

Change-Id: I478e835a49beaa2cd6f07650b2e8c3726979018d
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Orgad Shaneh
2018-04-04 21:53:26 +03:00
committed by Orgad Shaneh
parent 2dcb558945
commit 1c82a53e74

View File

@@ -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 (...) {