diff --git a/src/libs/vlayout/vtextmanager.cpp b/src/libs/vlayout/vtextmanager.cpp index ddabcc98c..b32648954 100644 --- a/src/libs/vlayout/vtextmanager.cpp +++ b/src/libs/vlayout/vtextmanager.cpp @@ -263,8 +263,10 @@ QMap PreparePlaceholders(const VAbstractPattern *doc, const VC } catch (qmu::QmuParserError &e) { - qCritical("%s\n\n%s", qUtf8Printable(QObject::tr("Failed to prepare final measurement placeholder.")), - qUtf8Printable(QObject::tr("Parser error at line %1: %2.").arg(i+1).arg(e.GetMsg()))); + const QString errorMsg = QObject::tr("Failed to prepare final measurement placeholder. Parser error at " + "line %1: %2.").arg(i+1).arg(e.GetMsg()); + qApp->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg; } } } diff --git a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp index ab65cf3c2..55b5f2ba9 100644 --- a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp @@ -580,8 +580,10 @@ void DialogEditLabel::InitPlaceholders() } catch (qmu::QmuParserError &e) { - qCritical("%s\n\n%s", qUtf8Printable(QObject::tr("Failed to prepare final measurement placeholder.")), - qUtf8Printable(QObject::tr("Parser error at line %1: %2.").arg(i+1).arg(e.GetMsg()))); + const QString errorMsg = QObject::tr("Failed to prepare final measurement placeholder. Parser error at " + "line %1: %2.").arg(i+1).arg(e.GetMsg()); + qApp->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg; } } }