[geary: 2/6] Bubble error on inline image paste up to UI



commit 8299f9c17a2c2747af128c832e9ab60403323eb9
Author: Chris Heywood <15127-creywood users noreply gitlab gnome org>
Date:   Sat Dec 7 08:52:43 2019 +0100

    Bubble error on inline image paste up to UI

 src/client/composer/composer-widget.vala | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 7141878f..14f98643 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -2080,8 +2080,12 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
                         this.editor.insert_image(
                             Components.WebView.INTERNAL_URL_PREFIX + unique_filename
                         );
-                    } catch (Error err) {
-                        warning("Failed to convert pasted clipboard image to PNG");
+                        throw new Geary.EngineError.UNSUPPORTED("Mock method");
+                    } catch (Error error) {
+                        warning("Failed to convert pasted clipboard image to PNG: %s", error.message);
+                        this.application.controller.report_problem(
+                            new Geary.ProblemReport(error)
+                        );
                     }
 
                     stop_background_work_pulse();


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