[tracker/tracker-0.8] libtracker-data: Fixes NB#174591, Throw error on undefined variable in expressions
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.8] libtracker-data: Fixes NB#174591, Throw error on undefined variable in expressions
- Date: Thu, 17 Jun 2010 15:40:15 +0000 (UTC)
commit aea310dbfa59289bf5ce625215fb3c26cc2b1199
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Jun 15 11:43:32 2010 +0200
libtracker-data: Fixes NB#174591, Throw error on undefined variable in expressions
src/libtracker-data/tracker-sparql-expression.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-expression.vala b/src/libtracker-data/tracker-sparql-expression.vala
index c9ce642..7e3af0d 100644
--- a/src/libtracker-data/tracker-sparql-expression.vala
+++ b/src/libtracker-data/tracker-sparql-expression.vala
@@ -864,7 +864,9 @@ class Tracker.Sparql.Expression : Object {
sql.append (variable.sql_expression);
if (variable.binding == null) {
- return PropertyType.UNKNOWN;
+ // NB#174591, I replaced `return PropertyType.UNKNOWN` with throw
+ // make-test still works and the query now returns this error.
+ throw get_error ("use of undefined variable `%s'".printf (variable.name));
} else {
return variable.binding.data_type;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]