[tracker] Added error throwing for delete { <uri> pred ?var } where ?var is undefined



commit 211a286f0b12cbe5a183b319b77b3c35bb68d4de
Author: Philip Van Hoof <philip codeminded be>
Date:   Mon Aug 31 17:19:14 2009 +0200

    Added error throwing for delete { <uri> pred ?var } where ?var is undefined

 src/libtracker-data/tracker-sparql-query.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-query.vala b/src/libtracker-data/tracker-sparql-query.vala
index 1434005..aeb9d87 100644
--- a/src/libtracker-data/tracker-sparql-query.vala
+++ b/src/libtracker-data/tracker-sparql-query.vala
@@ -1643,6 +1643,9 @@ public class Tracker.SparqlQuery : Object {
 		if (current () == SparqlTokenType.VAR) {
 			next ();
 			result = var_value_map.lookup (get_last_string ().substring (1));
+			if (result == null) {
+				throw get_error ("undefined variable");
+			}
 		} else if (current () == SparqlTokenType.IRI_REF) {
 			next ();
 			result = get_last_string (1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]