From 7aebc22d88825474a4c98ed8e96e8c357b5d544d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 17 Jan 2017 12:26:25 +0200 Subject: [PATCH] Use MessageHandler to show better error message when load xsd schema. --HG-- branch : feature --- src/libs/ifc/xml/vdomdocument.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/ifc/xml/vdomdocument.cpp b/src/libs/ifc/xml/vdomdocument.cpp index f8efed3e9..e5a590f11 100644 --- a/src/libs/ifc/xml/vdomdocument.cpp +++ b/src/libs/ifc/xml/vdomdocument.cpp @@ -495,8 +495,9 @@ void VDomDocument::ValidateXML(const QString &schema, const QString &fileName) { pattern.close(); fileSchema.close(); - const QString errorMsg(tr("Could not load schema file '%1'.").arg(fileSchema.fileName())); - throw VException(errorMsg); + VException e(messageHandler.statusMessage()); + e.AddMoreInformation(tr("Could not load schema file '%1'.").arg(fileSchema.fileName())); + throw e; } qCDebug(vXML, "Schema loaded.");