mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -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;
|
||||
}
|
||||
|
||||
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));
|
||||
search.log = [&](size_t /*ln*/, size_t col, const std::string &msg) {
|
||||
_error = QString("Error at position %1: %2").arg(col).arg(QString::fromStdString(msg));
|
||||
};
|
||||
|
||||
if (!search.parse(ba.data(), result)) {
|
||||
qDebug() << "Filter string error" << _error;
|
||||
qDebug().nospace() << "FilterString error for " << expr << "; " << qPrintable(_error);
|
||||
result = [](CardData) -> bool { return false; };
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue