[geary/mjog/fix-composer-undhandled-error-build-warning] Fix unhandled error build waning
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/fix-composer-undhandled-error-build-warning] Fix unhandled error build waning
- Date: Tue, 5 Nov 2019 00:00:38 +0000 (UTC)
commit 09b8c8e5b90de3c19027e74a7e8875125f5efafc
Author: Michael Gratton <mike vee net>
Date: Tue Nov 5 10:59:51 2019 +1100
Fix unhandled error build waning
src/client/application/application-controller.vala | 11 ++++++++---
src/client/composer/composer-widget.vala | 3 ++-
2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/client/application/application-controller.vala
b/src/client/application/application-controller.vala
index 22f22758..204b5599 100644
--- a/src/client/application/application-controller.vala
+++ b/src/client/application/application-controller.vala
@@ -2094,8 +2094,9 @@ public class Application.Controller : Geary.BaseObject {
try {
full = yield context.emails.fetch_email_async(
referred.id,
- Geary.ComposedEmail.REQUIRED_REPLY_FIELDS,
- Geary.Folder.ListFlags.NONE,
+ Geary.ComposedEmail.REQUIRED_REPLY_FIELDS |
+ ComposerWidget.REQUIRED_FIELDS,
+ NONE,
cancellable
);
} catch (Error e) {
@@ -2103,7 +2104,11 @@ public class Application.Controller : Geary.BaseObject {
}
}
}
- yield widget.load(full, quote, cancellable);
+ try {
+ yield widget.load(full, quote, cancellable);
+ } catch (GLib.Error err) {
+ report_problem(new Geary.ProblemReport(err));
+ }
widget.set_focus();
}
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 9c4878ea..ff59420a 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -623,7 +623,8 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
*/
public async void load(Geary.Email? referred = null,
string? quote = null,
- GLib.Cancellable? cancellable) {
+ GLib.Cancellable? cancellable)
+ throws GLib.Error {
if (referred != null &&
!referred.fields.is_all_set(REQUIRED_FIELDS)) {
throw new Geary.EngineError.INCOMPLETE_MESSAGE(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]