Use MessageHandler to show better error message when load xsd schema.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-01-17 12:26:25 +02:00
parent 8eba46ade1
commit 7aebc22d88

View File

@ -495,8 +495,9 @@ void VDomDocument::ValidateXML(const QString &schema, const QString &fileName)
{ {
pattern.close(); pattern.close();
fileSchema.close(); fileSchema.close();
const QString errorMsg(tr("Could not load schema file '%1'.").arg(fileSchema.fileName())); VException e(messageHandler.statusMessage());
throw VException(errorMsg); e.AddMoreInformation(tr("Could not load schema file '%1'.").arg(fileSchema.fileName()));
throw e;
} }
qCDebug(vXML, "Schema loaded."); qCDebug(vXML, "Schema loaded.");