Added proper handling of TDF parsing errors

This commit is contained in:
Nav
2021-06-08 00:43:45 +01:00
parent 3b6e13c22e
commit be1e978bb6

View File

@@ -17,7 +17,11 @@ void TargetDescriptionFile::init(const QString& xmlFilePath) {
file.open(QIODevice::ReadOnly); file.open(QIODevice::ReadOnly);
auto xml = QDomDocument(); auto xml = QDomDocument();
xml.setContent(file.readAll()); if (!xml.setContent(file.readAll())) {
throw Exception("Failed to parse target description file - please report this error "
"to Bloom developers via https://bloom.oscillate.io/report-issue");
}
this->init(xml); this->init(xml);
} }