unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] CLI/new: check status of notmuch_message_maildir_flags_to_tags
@ 2021-05-08 23:03 David Bremner
  2021-05-19 12:03 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: David Bremner @ 2021-05-08 23:03 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner

This improves error reporting since it prints the specifics of the exception.
---
 notmuch-new.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/notmuch-new.c b/notmuch-new.c
index 1169184f..119aea20 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -404,8 +404,11 @@ add_file (notmuch_database_t *notmuch, const char *filename,
 	break;
     /* Non-fatal issues (go on to next file). */
     case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID:
-	if (state->synchronize_flags)
-	    notmuch_message_maildir_flags_to_tags (message);
+	if (state->synchronize_flags) {
+	    status = notmuch_message_maildir_flags_to_tags (message);
+	    if (print_status_message("add_file", message, status))
+		goto DONE;
+	}
 	break;
     case NOTMUCH_STATUS_FILE_NOT_EMAIL:
 	fprintf (stderr, "Note: Ignoring non-mail file: %s\n", filename);
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] CLI/new: check status of notmuch_message_maildir_flags_to_tags
  2021-05-08 23:03 [PATCH] CLI/new: check status of notmuch_message_maildir_flags_to_tags David Bremner
@ 2021-05-19 12:03 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2021-05-19 12:03 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> writes:

> This improves error reporting since it prints the specifics of the exception.
> ---

applied, with whitespace cleanup, to master.

d

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-19 12:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08 23:03 [PATCH] CLI/new: check status of notmuch_message_maildir_flags_to_tags David Bremner
2021-05-19 12:03 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).