From 5a2604d2bd9f7d971b0d21e5aefc1151a84273ad Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 22 Feb 2017 19:49:17 +0200 Subject: [PATCH] "catch" a specific exception type. --HG-- branch : develop --- src/libs/vlayout/vlayoutpiece.cpp | 3 ++- src/libs/vtools/tools/vtoolseamallowance.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/vlayout/vlayoutpiece.cpp b/src/libs/vlayout/vlayoutpiece.cpp index 255f5c34a..4d9eeadd0 100644 --- a/src/libs/vlayout/vlayoutpiece.cpp +++ b/src/libs/vlayout/vlayoutpiece.cpp @@ -250,8 +250,9 @@ void VLayoutPiece::SetGrainline(const VGrainlineGeometry& geom, const VContainer dLen = cal2.EvalFormula(rPattern.PlainVariables(), qsFormula); dLen = ToPixel(dLen, *rPattern.GetPatternUnit()); } - catch(...) + catch(qmu::QmuParserError &e) { + Q_UNUSED(e); return; } diff --git a/src/libs/vtools/tools/vtoolseamallowance.cpp b/src/libs/vtools/tools/vtoolseamallowance.cpp index d324fda3f..4d13e909a 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.cpp +++ b/src/libs/vtools/tools/vtoolseamallowance.cpp @@ -509,8 +509,9 @@ void VToolSeamAllowance::UpdateGrainline() Calculator cal2; dLength = cal2.EvalFormula(VDataTool::data.PlainVariables(), qsFormula); } - catch(...) + catch(qmu::QmuParserError &e) { + Q_UNUSED(e); m_grainLine->hide(); return; }