Mercurial > hg > svcore
diff rdf/RDFTransformFactory.cpp @ 1172:59ae7e04f7e9
Merge
author | Chris Cannam |
---|---|
date | Fri, 04 Mar 2016 12:29:35 +0000 |
parents | d094598f84bd |
children |
line wrap: on
line diff
--- a/rdf/RDFTransformFactory.cpp Fri Mar 04 09:50:09 2016 +0000 +++ b/rdf/RDFTransformFactory.cpp Fri Mar 04 12:29:35 2016 +0000 @@ -129,7 +129,12 @@ } m_store->import(qurl, BasicStore::ImportIgnoreDuplicates); m_isRDF = true; - } catch (...) { } + } catch (const std::exception &e) { + // The file is not RDF -- we report this by returning false + // from isRDF (because we have not reached the m_isRDF = true + // line above), but we also set the error string + m_errorString = e.what(); + } } RDFTransformFactoryImpl::~RDFTransformFactoryImpl() @@ -146,7 +151,7 @@ bool RDFTransformFactoryImpl::isOK() { - return (m_errorString == ""); + return m_isRDF && (m_errorString == ""); } QString @@ -160,6 +165,8 @@ { std::vector<Transform> transforms; + if (!m_isRDF) return transforms; + std::map<QString, Transform> uriTransformMap; Nodes tnodes = m_store->match