From a9323f0055c767a5263e62e8d5b793ae2e592e15 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sun, 19 Feb 2017 19:53:23 +0100 Subject: [PATCH] screenshotmanager: Propagate errors for not implemented methods So users of SelectArea/ScreenShotArea() will know what is going on. --- src/ScreenshotManager.vala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ScreenshotManager.vala b/src/ScreenshotManager.vala index 46199c15..73ede22e 100644 --- a/src/ScreenshotManager.vala +++ b/src/ScreenshotManager.vala @@ -54,11 +54,13 @@ namespace Gala success = save_image (image, filename, out filename_used); } - public void screenshot_area (int x, int y, int width, int height, bool flash, string filename, out bool success, out string filename_used) + public void screenshot_area (int x, int y, int width, int height, bool flash, string filename, out bool success, out string filename_used) throws DBusError { warning ("ScreenShotArea not implemented"); filename_used = ""; success = false; + + throw new DBusError.FAILED ("ScreenShotArea not implemented"); } public void screenshot_window (bool include_frame, bool include_cursor, bool flash, string filename, out bool success, out string filename_used) @@ -82,10 +84,12 @@ namespace Gala success = save_image (image, filename, out filename_used); } - public void select_area (out int x, out int y, out int width, out int height) + public void select_area (out int x, out int y, out int width, out int height) throws DBusError { warning ("SelectArea not implemented"); x = y = width = height = 0; + + throw new DBusError.FAILED ("SelectArea not implemented"); } static bool save_image (Cairo.ImageSurface image, string filename, out string used_filename)