[tracker] tracker-store: Make sure to not send unmapped errors in D-Bus replies
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-store: Make sure to not send unmapped errors in D-Bus replies
- Date: Thu, 10 Feb 2011 14:33:54 +0000 (UTC)
commit 698c903297745c3cbc3c7427a4de55363afad835
Author: Jürg Billeter <j bitron ch>
Date: Thu Feb 10 15:28:20 2011 +0100
tracker-store: Make sure to not send unmapped errors in D-Bus replies
src/tracker-store/tracker-resources.vala | 30 +++++++++++++++++++++++++-----
src/tracker-store/tracker-steroids.vala | 18 +++++++++++++++---
2 files changed, 40 insertions(+), 8 deletions(-)
---
diff --git a/src/tracker-store/tracker-resources.vala b/src/tracker-store/tracker-resources.vala
index e482b1e..d73e2aa 100644
--- a/src/tracker-store/tracker-resources.vala
+++ b/src/tracker-store/tracker-resources.vala
@@ -70,7 +70,11 @@ public class Tracker.Resources : Object {
request.end ();
} catch (Error e) {
request.end (e);
- throw e;
+ if (e is Sparql.Error) {
+ throw e;
+ } else {
+ throw new Sparql.Error.INTERNAL (e.message);
+ }
}
}
@@ -109,7 +113,11 @@ public class Tracker.Resources : Object {
return result;
} catch (Error e) {
request.end (e);
- throw e;
+ if (e is Sparql.Error) {
+ throw e;
+ } else {
+ throw new Sparql.Error.INTERNAL (e.message);
+ }
}
}
@@ -122,7 +130,11 @@ public class Tracker.Resources : Object {
request.end ();
} catch (Error e) {
request.end (e);
- throw e;
+ if (e is Sparql.Error) {
+ throw e;
+ } else {
+ throw new Sparql.Error.INTERNAL (e.message);
+ }
}
}
@@ -150,7 +162,11 @@ public class Tracker.Resources : Object {
return builder.end ();
} catch (Error e) {
request.end (e);
- throw e;
+ if (e is Sparql.Error) {
+ throw e;
+ } else {
+ throw new Sparql.Error.INTERNAL (e.message);
+ }
}
}
@@ -171,7 +187,11 @@ public class Tracker.Resources : Object {
request.end ();
} catch (Error e) {
request.end (e);
- throw e;
+ if (e is Sparql.Error) {
+ throw e;
+ } else {
+ throw new Sparql.Error.INTERNAL (e.message);
+ }
}
}
diff --git a/src/tracker-store/tracker-steroids.vala b/src/tracker-store/tracker-steroids.vala
index 0a9b109..eae23e1 100644
--- a/src/tracker-store/tracker-steroids.vala
+++ b/src/tracker-store/tracker-steroids.vala
@@ -81,7 +81,11 @@ public class Tracker.Steroids : Object {
return variable_names;
} catch (Error e) {
request.end (e);
- throw e;
+ if (e is Sparql.Error) {
+ throw e;
+ } else {
+ throw new Sparql.Error.INTERNAL (e.message);
+ }
}
}
@@ -136,7 +140,11 @@ public class Tracker.Steroids : Object {
}
} catch (Error e) {
request.end (e);
- throw e;
+ if (e is Sparql.Error) {
+ throw e;
+ } else {
+ throw new Sparql.Error.INTERNAL (e.message);
+ }
}
}
@@ -207,7 +215,11 @@ public class Tracker.Steroids : Object {
return builder.end ();
} catch (Error e) {
request.end (e);
- throw e;
+ if (e is Sparql.Error) {
+ throw e;
+ } else {
+ throw new Sparql.Error.INTERNAL (e.message);
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]