[systemd-devel] [PATCH 11/14] systemadm: catch exceptions generated by dbus
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Mon Sep 19 04:24:26 PDT 2011
Otherwise, access-denied dbus errors were not caught, and only
caused a message to be printed out on the console. After this
change a proper popup window pops up :).
---
src/systemadm.vala | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/systemadm.vala b/src/systemadm.vala
index a0c140e..5b05bcb 100644
--- a/src/systemadm.vala
+++ b/src/systemadm.vala
@@ -643,7 +643,7 @@ public class MainWindow : Window {
try {
u.start("replace");
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -656,7 +656,7 @@ public class MainWindow : Window {
try {
u.stop("replace");
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -669,7 +669,7 @@ public class MainWindow : Window {
try {
u.reload("replace");
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -682,7 +682,7 @@ public class MainWindow : Window {
try {
u.restart("replace");
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -695,7 +695,7 @@ public class MainWindow : Window {
try {
j.cancel();
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -723,7 +723,7 @@ public class MainWindow : Window {
4, u.sub_state,
5, t != "" ? "→ %s".printf(t) : "",
6, u);
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -749,7 +749,7 @@ public class MainWindow : Window {
unit_map[id] = u;
update_unit_iter(iter, id, u);
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -785,7 +785,7 @@ public class MainWindow : Window {
update_job_iter(iter, id, j);
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -867,7 +867,7 @@ public class MainWindow : Window {
} while (unit_model.iter_next(ref iter));
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -903,7 +903,7 @@ public class MainWindow : Window {
} while (job_model.iter_next(ref iter));
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -958,7 +958,7 @@ public class MainWindow : Window {
public void on_server_reload() {
try {
manager.reload();
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -970,7 +970,7 @@ public class MainWindow : Window {
if (unit_type_combo_box.get_active() != 0)
unit_type_combo_box.set_active(8);
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -999,7 +999,7 @@ public class MainWindow : Window {
m.destroy();
show_unit(u);
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
}
@@ -1019,7 +1019,7 @@ public class MainWindow : Window {
path);
show_unit(u);
- } catch (IOError e) {
+ } catch (Error e) {
show_error(e.message);
}
--
1.7.5.4
More information about the systemd-devel
mailing list