[tracker] Throwing an error when an unsupported operation is requested
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] Throwing an error when an unsupported operation is requested
- Date: Fri, 31 Jul 2009 09:36:01 +0000 (UTC)
commit 489c1dbc9feb32484c31fa017100ac06c1ebc3fe
Author: Philip Van Hoof <philip codeminded be>
Date: Fri Jul 31 11:35:14 2009 +0200
Throwing an error when an unsupported operation is requested
src/libtracker-data/tracker-sparql-query.vala | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-query.vala b/src/libtracker-data/tracker-sparql-query.vala
index f714a86..89ab894 100644
--- a/src/libtracker-data/tracker-sparql-query.vala
+++ b/src/libtracker-data/tracker-sparql-query.vala
@@ -22,7 +22,8 @@ public errordomain Tracker.SparqlError {
UNKNOWN_CLASS,
UNKNOWN_PROPERTY,
TYPE,
- INTERNAL
+ INTERNAL,
+ UNSUPPORTED
}
public class Tracker.SparqlQuery : Object {
@@ -1099,7 +1100,7 @@ public class Tracker.SparqlQuery : Object {
return false;
}
- void visit_filter (Rasqal.Expression expr, bool is_datetime = false) {
+ void visit_filter (Rasqal.Expression expr, bool is_datetime = false) throws SparqlError {
switch (expr.op) {
case Rasqal.Op.AND:
case Rasqal.Op.OR:
@@ -1215,7 +1216,7 @@ public class Tracker.SparqlQuery : Object {
pattern_sql.append (")");
break;
default:
- break;
+ throw new SparqlError.UNSUPPORTED ("Unsupported operation");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]