aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2013-06-25 17:22:15 -0400
committerWilliam Hua <william.hua@canonical.com>2013-06-25 17:22:15 -0400
commita8b6bb97a86e61844e34a99d35a7c4b7e3f2ee05 (patch)
tree9346b816733f705a189de7b617bc9e39e4da8abc /lib
parent900fadf5e6e12f21d3dedf4b0bd0636cbfca6313 (diff)
downloadayatana-indicator-keyboard-a8b6bb97a86e61844e34a99d35a7c4b7e3f2ee05.tar.gz
ayatana-indicator-keyboard-a8b6bb97a86e61844e34a99d35a7c4b7e3f2ee05.tar.bz2
ayatana-indicator-keyboard-a8b6bb97a86e61844e34a99d35a7c4b7e3f2ee05.zip
Tests work-in-progress.
Diffstat (limited to 'lib')
-rw-r--r--lib/main.vala20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/main.vala b/lib/main.vala
index c74dfc05..6df1b069 100644
--- a/lib/main.vala
+++ b/lib/main.vala
@@ -418,8 +418,8 @@ public class Indicator.Keyboard.Service : Object {
try {
this.icons[index] = Icon.new_for_string (engine.get_icon ());
- } catch {
- warn_if_reached ();
+ } catch (Error error) {
+ warning ("error: %s", error.message);
}
}
}
@@ -640,8 +640,8 @@ public class Indicator.Keyboard.Service : Object {
private void handle_activate_map (Variant? parameter) {
try {
Process.spawn_command_line_async ("gucharmap");
- } catch {
- warn_if_reached ();
+ } catch (SpawnError error) {
+ warning ("error: %s", error.message);
}
}
@@ -686,8 +686,8 @@ public class Indicator.Keyboard.Service : Object {
}
Process.spawn_command_line_async (command);
- } catch {
- warn_if_reached ();
+ } catch (SpawnError error) {
+ warning ("error: %s", error.message);
}
}
@@ -695,8 +695,8 @@ public class Indicator.Keyboard.Service : Object {
private void handle_activate_settings (Variant? parameter) {
try {
Process.spawn_command_line_async ("gnome-control-center region layouts");
- } catch {
- warn_if_reached ();
+ } catch (SpawnError error) {
+ warning ("error: %s", error.message);
}
}
@@ -705,8 +705,8 @@ public class Indicator.Keyboard.Service : Object {
try {
connection.export_action_group ("/com/canonical/indicator/keyboard", get_action_group ());
connection.export_menu_model ("/com/canonical/indicator/keyboard/desktop", get_menu_model ());
- } catch {
- warn_if_reached ();
+ } catch (Error error) {
+ warning ("error: %s", error.message);
}
}