diff --git a/plugins/notify/NotifyServer.vala b/plugins/notify/NotifyServer.vala index 94f52c14..240f397a 100644 --- a/plugins/notify/NotifyServer.vala +++ b/plugins/notify/NotifyServer.vala @@ -97,7 +97,7 @@ namespace Gala.Plugins.Notify app_info_cache = new Gee.HashMap (); } - public string [] get_capabilities () + public string [] get_capabilities () throws DBusError, IOError { return { "body", @@ -114,7 +114,7 @@ namespace Gala.Plugins.Notify } public void get_server_information (out string name, out string vendor, - out string version, out string spec_version) + out string version, out string spec_version) throws DBusError, IOError { name = "pantheon-notify"; vendor = "elementaryOS"; @@ -127,7 +127,7 @@ namespace Gala.Plugins.Notify * * @param id The id of the notification to be closed. */ - public void close_notification (uint32 id) throws DBusError + public void close_notification (uint32 id) throws DBusError, IOError { foreach (var child in stack.get_children ()) { unowned Notification notification = (Notification) child; @@ -148,6 +148,7 @@ namespace Gala.Plugins.Notify public new uint32 notify (string app_name, uint32 replaces_id, string app_icon, string summary, string body, string[] actions, HashTable hints, int32 expire_timeout, BusName sender) + throws DBusError, IOError { unowned Variant? variant = null; diff --git a/src/DBus.vala b/src/DBus.vala index e9c1b81f..dc720bc0 100644 --- a/src/DBus.vala +++ b/src/DBus.vala @@ -64,7 +64,7 @@ namespace Gala assert_not_reached (); } - public void perform_action (ActionType type) + public void perform_action (ActionType type) throws DBusError, IOError { wm.perform_action (type); } @@ -114,7 +114,7 @@ namespace Gala */ public async ColorInformation get_background_color_information (int monitor, int reference_x, int reference_y, int reference_width, int reference_height) - throws DBusError + throws DBusError, IOError { var background = wm.background_group.get_child_at_index (monitor); if (background == null) diff --git a/src/DBusAccelerator.vala b/src/DBusAccelerator.vala index f9b1b7e6..fcd01a45 100644 --- a/src/DBusAccelerator.vala +++ b/src/DBusAccelerator.vala @@ -63,7 +63,7 @@ namespace Gala } } - public uint grab_accelerator (string accelerator, uint flags) + public uint grab_accelerator (string accelerator, uint flags) throws DBusError, IOError { uint? action = grabbed_accelerators[accelerator]; @@ -77,7 +77,7 @@ namespace Gala return action; } - public uint[] grab_accelerators (Accelerator[] accelerators) + public uint[] grab_accelerators (Accelerator[] accelerators) throws DBusError, IOError { uint[] actions = {}; @@ -88,7 +88,7 @@ namespace Gala return actions; } - public bool ungrab_accelerator (uint action) + public bool ungrab_accelerator (uint action) throws DBusError, IOError { bool ret = false; @@ -104,7 +104,7 @@ namespace Gala } [DBus (name = "ShowOSD")] - public void show_osd (GLib.HashTable parameters) + public void show_osd (GLib.HashTable parameters) throws DBusError, IOError { int32 monitor_index = -1; if (parameters.contains ("monitor")) diff --git a/src/MediaFeedback.vala b/src/MediaFeedback.vala index baba41d9..e87eae65 100644 --- a/src/MediaFeedback.vala +++ b/src/MediaFeedback.vala @@ -21,7 +21,7 @@ namespace Gala interface DBusNotifications : GLib.Object { public abstract uint32 notify (string app_name, uint32 replaces_id, string app_icon, string summary, - string body, string[] actions, HashTable hints, int32 expire_timeout) throws IOError; + string body, string[] actions, HashTable hints, int32 expire_timeout) throws DBusError, IOError; } public class MediaFeedback : GLib.Object @@ -121,7 +121,7 @@ namespace Gala try { notification_id = notifications.notify ("gala-feedback", notification_id, feedback.icon, "", "", {}, hints, 2000); - } catch (IOError e) { + } catch (Error e) { critical ("%s", e.message); } } diff --git a/src/ScreenSaver.vala b/src/ScreenSaver.vala index c5e360a9..912e4f3d 100644 --- a/src/ScreenSaver.vala +++ b/src/ScreenSaver.vala @@ -20,7 +20,7 @@ namespace Gala [DBus (name = "org.gnome.ScreenSaver")] public interface ScreenSaver : GLib.Object { - public abstract bool get_active () throws GLib.IOError; + public abstract bool get_active () throws DBusError, IOError; public signal void active_changed (bool active); } diff --git a/src/ScreenshotManager.vala b/src/ScreenshotManager.vala index db540b30..a57d7f9a 100644 --- a/src/ScreenshotManager.vala +++ b/src/ScreenshotManager.vala @@ -38,12 +38,12 @@ namespace Gala wm = _wm; } - public void flash_area (int x, int y, int width, int height) + public void flash_area (int x, int y, int width, int height) throws DBusError, IOError { warning ("FlashArea not implemented"); } - public void screenshot (bool include_cursor, bool flash, string filename, out bool success, out string filename_used) + public void screenshot (bool include_cursor, bool flash, string filename, out bool success, out string filename_used) throws DBusError, IOError { debug ("Taking screenshot"); @@ -54,7 +54,7 @@ namespace Gala success = save_image (image, filename, out filename_used); } - public async void screenshot_area (int x, int y, int width, int height, bool flash, string filename, out bool success, out string filename_used) throws DBusError + public async void screenshot_area (int x, int y, int width, int height, bool flash, string filename, out bool success, out string filename_used) throws DBusError, IOError { debug ("Taking area screenshot"); @@ -66,7 +66,7 @@ namespace Gala throw new DBusError.FAILED ("Failed to save image"); } - public void screenshot_window (bool include_frame, bool include_cursor, bool flash, string filename, out bool success, out string filename_used) + public void screenshot_window (bool include_frame, bool include_cursor, bool flash, string filename, out bool success, out string filename_used) throws DBusError, IOError { debug ("Taking window screenshot"); @@ -91,7 +91,7 @@ namespace Gala success = save_image (image, filename, out filename_used); } - public async void select_area (out int x, out int y, out int width, out int height) + public async void select_area (out int x, out int y, out int width, out int height) throws DBusError, IOError { var selection_area = new SelectionArea (wm); selection_area.closed.connect (() => Idle.add (select_area.callback));