"catch" a specific exception type.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-02-22 19:49:17 +02:00
parent 34b70cfb02
commit 5a2604d2bd
2 changed files with 4 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}