[Qt-interest] QXmlSchemaValidator::validate throws exception on validation error
Ulf-Alexander v. Ceumern-Lindenstjerna
ceumern at vrmagic.com
Tue May 11 16:04:42 CEST 2010
Hi all,
I just recently decided to use QXmlSchemaValidator to validate my xml
files.
This seems to work just fine, except that QXmlSchemaValidator::validate
throws an exception deep in QPatternist::ReportContext::createError:
void ReportContext::createError(const QString &description,
const QtMsgType type,
const QUrl &id,
const QSourceLocation &sourceLocation)
const
{
messageHandler()->message(type, finalizeDescription(description),
id, sourceLocation);
throw Exception(true); // <------ here
}
Is that the intended behavior?
Am I supposed to try/catch QXmlSchemaValidator::validate?
If yes, isn't this unlike the rest of Qt?
If no, why does it throw?
Secondly, how do I get the error message?
Regards, Ulf
More information about the Qt-interest-old
mailing list