Skip to content
Permalink
Browse files

Fix warning: catching polymorphic type ‘class Grantlee::Exception’ by…

… value [-Wcatch-value=]
  • Loading branch information...
Montel authored and steveire committed Mar 4, 2019
1 parent 3cb4bd2 commit 474472c4d4a271efbc134f077bd75b8206307543
Showing with 4 additions and 4 deletions.
  1. +1 −1 templates/defaulttags/if.cpp
  2. +1 −1 templates/defaulttags/if_p.h
  3. +2 −2 templates/lib/parser.cpp
@@ -92,7 +92,7 @@ void IfNode::render(OutputStream *stream, Context *c) const
if (pair.first) {
try {
match = Grantlee::variantIsTrue(pair.first->evaluate(c));
} catch (Grantlee::Exception) {
} catch (const Grantlee::Exception &) {
}
} else {
match = true;
@@ -321,7 +321,7 @@ QVariant IfToken::evaluate(Context *c) const
Q_ASSERT(!"Invalid OpCode");
return QVariant();
}
} catch (Grantlee::Exception) {
} catch (const Grantlee::Exception &) {
return false;
}
}
@@ -205,7 +205,7 @@ NodeList ParserPrivate::parse(QObject *parent, const QStringList &stopAt)
FilterExpression filterExpression;
try {
filterExpression = FilterExpression(token.content, q);
} catch (Grantlee::Exception e) {
} catch (const Grantlee::Exception &e) {
throw Grantlee::Exception(e.errorCode(),
QStringLiteral("%1, line %2, %3")
.arg(e.what())
@@ -247,7 +247,7 @@ NodeList ParserPrivate::parse(QObject *parent, const QStringList &stopAt)
Node *n;
try {
n = nodeFactory->getNode(token.content, q);
} catch (Grantlee::Exception e) {
} catch (const Grantlee::Exception &e) {
throw Grantlee::Exception(e.errorCode(),
QStringLiteral("%1, line %2, %3")
.arg(e.what())

0 comments on commit 474472c

Please sign in to comment.
You can’t perform that action at this time.