Improve error handling for final measurements placeholders. #85
This commit is contained in:
parent
4ee901d97c
commit
6d3d624980
|
@ -263,8 +263,10 @@ QMap<QString, QString> PreparePlaceholders(const VAbstractPattern *doc, const VC
|
||||||
}
|
}
|
||||||
catch (qmu::QmuParserError &e)
|
catch (qmu::QmuParserError &e)
|
||||||
{
|
{
|
||||||
qCritical("%s\n\n%s", qUtf8Printable(QObject::tr("Failed to prepare final measurement placeholder.")),
|
const QString errorMsg = QObject::tr("Failed to prepare final measurement placeholder. Parser error at "
|
||||||
qUtf8Printable(QObject::tr("Parser error at line %1: %2.").arg(i+1).arg(e.GetMsg())));
|
"line %1: %2.").arg(i+1).arg(e.GetMsg());
|
||||||
|
qApp->IsPedantic() ? throw VException(errorMsg) :
|
||||||
|
qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -580,8 +580,10 @@ void DialogEditLabel::InitPlaceholders()
|
||||||
}
|
}
|
||||||
catch (qmu::QmuParserError &e)
|
catch (qmu::QmuParserError &e)
|
||||||
{
|
{
|
||||||
qCritical("%s\n\n%s", qUtf8Printable(QObject::tr("Failed to prepare final measurement placeholder.")),
|
const QString errorMsg = QObject::tr("Failed to prepare final measurement placeholder. Parser error at "
|
||||||
qUtf8Printable(QObject::tr("Parser error at line %1: %2.").arg(i+1).arg(e.GetMsg())));
|
"line %1: %2.").arg(i+1).arg(e.GetMsg());
|
||||||
|
qApp->IsPedantic() ? throw VException(errorMsg) :
|
||||||
|
qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user