X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=blobdiff_plain;f=saml%2Fsaml2%2Fmetadata%2Fimpl%2FXMLMetadataProvider.cpp;h=8214e3a0b3c410fbbeb0c386e345bddd9e8790a3;hp=bc24ed86c1033df85c7077e2795789d6e21347e5;hb=384f649a7ef352f15223417de3167bd67224bb00;hpb=d85415d5ee3fac83440c7cde7a2fe18972920702 diff --git a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp index bc24ed8..8214e3a 100644 --- a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp @@ -102,8 +102,15 @@ pair XMLMetadataProvider::load() ); // Preprocess the metadata. - if (!m_validate) - SchemaValidators.validate(xmlObject.get()); + if (!m_validate) { + try { + SchemaValidators.validate(xmlObject.get()); + } + catch (exception& ex) { + m_log.error("metadata intance failed manual schema validation checking: ", ex.what()); + throw MetadataException("Metadata instance failed manual schema validation checking."); + } + } doFilters(*xmlObject.get()); xmlObject->releaseThisAndChildrenDOM(); xmlObject->setDocument(NULL);