diff rdf/SimpleSPARQLQuery.cpp @ 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 0944d13689b2
children 8878efd21dbc
line wrap: on
line diff
--- 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;