unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: notmuch@notmuchmail.org
Subject: [PATCH 3/3] new: Print final fatal error message to stderr
Date: Mon, 27 Feb 2012 10:49:19 -0500	[thread overview]
Message-ID: <1330357759-1337-4-git-send-email-amdragon@mit.edu> (raw)
In-Reply-To: <1330357759-1337-1-git-send-email-amdragon@mit.edu>

This was going to stdout.  I removed the newline at the beginning of
printing the fatal error message because it wouldn't make sense if you
were only looking at the stderr stream (e.g., you had redirected
stdout to /dev/null).
---
 notmuch-new.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/notmuch-new.c b/notmuch-new.c
index 0cbd479..9ad790d 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -1029,8 +1029,8 @@ notmuch_new_command (void *ctx, int argc, char *argv[])
     printf ("\n");
 
     if (ret)
-	printf ("\nNote: A fatal error was encountered: %s\n",
-		notmuch_status_to_string (ret));
+	fprintf (stderr, "Note: A fatal error was encountered: %s\n",
+		 notmuch_status_to_string (ret));
 
     notmuch_database_close (notmuch);
 
-- 
1.7.7.3

  parent reply	other threads:[~2012-02-27 15:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 15:49 [PATCH 0/3] Fix some error handling in notmuch new Austin Clements
2012-02-27 15:49 ` [PATCH 1/3] new: Consistently treat fatal errors as fatal Austin Clements
2012-04-16 15:53   ` Mark Walters
2012-04-22  4:11     ` Austin Clements
2012-02-27 15:49 ` [PATCH 2/3] new: Handle fatal errors in remove_filename and _remove_directory Austin Clements
2012-04-16 16:02   ` Mark Walters
2012-04-22  4:21     ` Austin Clements
2012-02-27 15:49 ` Austin Clements [this message]
2012-04-22  4:27 ` [PATCH v2 0/4] Fix some error handling in notmuch new Austin Clements
2012-04-22  4:27   ` [PATCH v2 1/4] new: Consistently treat fatal errors as fatal Austin Clements
2012-04-22  4:27   ` [PATCH v2 2/4] new: Handle fatal errors in remove_filename and _remove_directory Austin Clements
2012-04-22  7:34     ` Mark Walters
2012-04-22 15:36       ` Austin Clements
2012-04-22  4:27   ` [PATCH v2 3/4] new: Print final fatal error message to stderr Austin Clements
2012-04-22  4:27   ` [PATCH v2 4/4] new: Fix missing end_atomic in remove_filename on error Austin Clements
2012-04-22  7:42     ` Mark Walters
2012-04-22 15:50 ` [PATCH v3 0/4] Fix some error handling in notmuch new Austin Clements
2012-04-22 15:50   ` [PATCH v3 1/4] new: Consistently treat fatal errors as fatal Austin Clements
2012-04-25  2:28     ` David Bremner
2012-04-22 15:50   ` [PATCH v3 2/4] new: Handle fatal errors in remove_filename and _remove_directory Austin Clements
2012-04-22 15:50   ` [PATCH v3 3/4] new: Print final fatal error message to stderr Austin Clements
2012-04-22 15:50   ` [PATCH v3 4/4] new: Fix missing end_atomic in remove_filename on error Austin Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330357759-1337-4-git-send-email-amdragon@mit.edu \
    --to=amdragon@mit.edu \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).