mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Log xml parse errors when loading card database (#6006)
This commit is contained in:
parent
208f8349a6
commit
4f1b4b1283
3 changed files with 13 additions and 2 deletions
|
|
@ -245,8 +245,9 @@ LoadStatus CardDatabase::loadCardDatabase(const QString &path)
|
|||
}
|
||||
|
||||
int msecs = startTime.msecsTo(QTime::currentTime());
|
||||
qCInfo(CardDatabaseLoadingLog) << "Path =" << path << "Status =" << tempLoadStatus << "Cards =" << cards.size()
|
||||
<< "Sets =" << sets.size() << QString("%1ms").arg(msecs);
|
||||
qCInfo(CardDatabaseLoadingLog) << "Loaded card database: Path =" << path << "Status =" << tempLoadStatus
|
||||
<< "Cards =" << cards.size() << "Sets =" << sets.size()
|
||||
<< QString("%1ms").arg(msecs);
|
||||
|
||||
return tempLoadStatus;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,11 @@ void CockatriceXml3Parser::parseFile(QIODevice &device)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (xml.hasError()) {
|
||||
QString preamble = tr("Parse error at line %1 col %2:").arg(xml.lineNumber()).arg(xml.columnNumber());
|
||||
qCWarning(CockatriceXml3Log).noquote() << preamble << xml.errorString();
|
||||
}
|
||||
}
|
||||
|
||||
void CockatriceXml3Parser::loadSetsFromXml(QXmlStreamReader &xml)
|
||||
|
|
|
|||
|
|
@ -66,6 +66,11 @@ void CockatriceXml4Parser::parseFile(QIODevice &device)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (xml.hasError()) {
|
||||
QString preamble = tr("Parse error at line %1 col %2:").arg(xml.lineNumber()).arg(xml.columnNumber());
|
||||
qCWarning(CockatriceXml4Log).noquote() << preamble << xml.errorString();
|
||||
}
|
||||
}
|
||||
|
||||
void CockatriceXml4Parser::loadSetsFromXml(QXmlStreamReader &xml)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue