Mercurial > hg > svcore
changeset 511:7207e3eba44f sv-v1.4rc1
* Ensure SimpleSPARQLQuery stores an error string properly when query
fails -- so (apart from anything else) RDFImporter::identifyDocumentType
returns a sensible result for non-RDF
author | Chris Cannam |
---|---|
date | Mon, 08 Dec 2008 15:08:39 +0000 |
parents | af7b6e55895b |
children | e7a39c45a7a4 |
files | data/model/Model.cpp rdf/SimpleSPARQLQuery.cpp |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/data/model/Model.cpp Mon Dec 08 11:53:10 2008 +0000 +++ b/data/model/Model.cpp Mon Dec 08 15:08:39 2008 +0000 @@ -59,7 +59,7 @@ void Model::aboutToDelete() { - std::cerr << "Model(" << this << ")::aboutToDelete()" << std::endl; +// std::cerr << "Model(" << this << ")::aboutToDelete()" << std::endl; if (m_aboutToDelete) { std::cerr << "WARNING: Model(" << this << ", \""
--- a/rdf/SimpleSPARQLQuery.cpp Mon Dec 08 11:53:10 2008 +0000 +++ b/rdf/SimpleSPARQLQuery.cpp Mon Dec 08 15:08:39 2008 +0000 @@ -449,13 +449,13 @@ } if (!results) { - cerr << "SimpleSPARQLQuery: LIBRDF query failed" << endl; + m_errorString = "RDF query failed"; librdf_free_query(query); return list; } if (!librdf_query_results_is_bindings(results)) { - cerr << "SimpleSPARQLQuery: LIBRDF query has wrong result type (not bindings)" << endl; + m_errorString = "RDF query returned non-bindings results"; librdf_free_query_results(results); librdf_free_query(query); return list;