[geary/wip/131-sent-mail: 7/14] Handle Smtp.ClientService null condition better
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/131-sent-mail: 7/14] Handle Smtp.ClientService null condition better
- Date: Mon, 26 Aug 2019 03:33:29 +0000 (UTC)
commit 079d0205b7c3df66c6c074c9dc89a006384e56c1
Author: Michael Gratton <mike vee net>
Date: Sat Aug 10 12:07:54 2019 +1000
Handle Smtp.ClientService null condition better
src/engine/smtp/smtp-client-service.vala | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/engine/smtp/smtp-client-service.vala b/src/engine/smtp/smtp-client-service.vala
index 59c41ba0..a5a41ac4 100644
--- a/src/engine/smtp/smtp-client-service.vala
+++ b/src/engine/smtp/smtp-client-service.vala
@@ -137,6 +137,9 @@ internal class Geary.Smtp.ClientService : Geary.ClientService {
cancellable.cancel();
} catch (GLib.IOError.CANCELLED err) {
// Nothing to do here — we're already cancelled.
+ } catch (EngineError.NOT_FOUND err) {
+ debug("Queued email %s not found in outbox, ignoring: %s",
+ id.to_string(), err.message);
} catch (GLib.Error err) {
notify_connection_failed(new ErrorContext(err));
cancellable.cancel();
@@ -194,15 +197,9 @@ internal class Geary.Smtp.ClientService : Geary.ClientService {
throw new SmtpError.AUTHENTICATION_FAILED("Credentials not loaded");
}
- Email? email = null;
- try {
- email = yield this.outbox.fetch_email_async(
- id, Email.Field.ALL, Folder.ListFlags.NONE, cancellable
- );
- } catch (EngineError.NOT_FOUND err) {
- debug("Queued email %s not found in outbox, ignoring: %s",
- id.to_string(), err.message);
- }
+ Email email = yield this.outbox.fetch_email_async(
+ id, Email.Field.ALL, Folder.ListFlags.NONE, cancellable
+ );
if (!email.email_flags.contains(EmailFlags.OUTBOX_SENT)) {
RFC822.Message message = email.get_message();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]