[tracker/wip/carlosg/transact-graphs: 1/2] libtracker-sparql: Strip remote error information from bus connection errors




commit 2fb3c573d3ca27fe39783e588fb45d8c9e314cd5
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Aug 23 21:43:00 2020 +0200

    libtracker-sparql: Strip remote error information from bus connection errors
    
    This is a detail we can abstract away. Particularly useless on errors we
    return on a local connection (eg. via SERVICE{})

 src/libtracker-sparql/bus/tracker-bus.vala | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-sparql/bus/tracker-bus.vala b/src/libtracker-sparql/bus/tracker-bus.vala
index fe16cd969..e3cd3b2f7 100644
--- a/src/libtracker-sparql/bus/tracker-bus.vala
+++ b/src/libtracker-sparql/bus/tracker-bus.vala
@@ -95,12 +95,16 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
                try {
                        message.to_gerror ();
                } catch (IOError e_io) {
+                       GLib.DBusError.strip_remote_error (e_io);
                        throw e_io;
-               } catch (Sparql.Error e_sparql) {
-                       throw e_sparql;
                } catch (DBusError e_dbus) {
+                       GLib.DBusError.strip_remote_error (e_dbus);
                        throw e_dbus;
+               } catch (Sparql.Error e_sparql) {
+                       GLib.DBusError.strip_remote_error (e_sparql);
+                       throw e_sparql;
                } catch (Error e) {
+                       GLib.DBusError.strip_remote_error (e);
                        throw new IOError.FAILED (e.message);
                }
        }


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