mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 20:43:54 -07:00
improve FilterString validation error message (#5240)
This commit is contained in:
parent
4ee6ff73e0
commit
b2ad2acff3
1 changed files with 3 additions and 3 deletions
|
|
@ -360,12 +360,12 @@ FilterString::FilterString(const QString &expr)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
search.log = [&](size_t ln, size_t col, const std::string &msg) {
|
search.log = [&](size_t /*ln*/, size_t col, const std::string &msg) {
|
||||||
_error = QString("%1:%2: %3").arg(ln).arg(col).arg(QString::fromStdString(msg));
|
_error = QString("Error at position %1: %2").arg(col).arg(QString::fromStdString(msg));
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!search.parse(ba.data(), result)) {
|
if (!search.parse(ba.data(), result)) {
|
||||||
qDebug() << "Filter string error" << _error;
|
qDebug().nospace() << "FilterString error for " << expr << "; " << qPrintable(_error);
|
||||||
result = [](CardData) -> bool { return false; };
|
result = [](CardData) -> bool { return false; };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue