about summary refs log tree commit homepage
path: root/lib/PublicInbox/NNTP.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-02-29 00:41:02 +0000
committerEric Wong <e@80x24.org>2016-02-29 00:41:02 +0000
commit1c0cfc8726c1c5e4085ad43bdf533b91af88e971 (patch)
tree072d073fbdb1ea20a4ebcf6fee6bd482ba58c8f1 /lib/PublicInbox/NNTP.pm
parente3fd8551e919b95a78f1f0ab0cfff12033291eeb (diff)
downloadpublic-inbox-1c0cfc8726c1c5e4085ad43bdf533b91af88e971.tar.gz
For error messages intended to show user error (e.g. giving
invalid options), we add a newline ("\n") at the end to
polluting the output with location information.

However, for diagnosing non-user-triggered errors, we should
show the location of where the error occured.
Diffstat (limited to 'lib/PublicInbox/NNTP.pm')
-rw-r--r--lib/PublicInbox/NNTP.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index bcce7703..fbf8f7f2 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -229,7 +229,7 @@ sub parse_time ($$;$) {
         use Time::Local qw();
         my ($hh, $mm, $ss) = unpack('A2A2A2', $time);
         if (defined $gmt) {
-                $gmt =~ /\A(?:UTC|GMT)\z/i or die "GM invalid: $gmt\n";
+                $gmt =~ /\A(?:UTC|GMT)\z/i or die "GM invalid: $gmt";
                 $gmt = 1;
         }
         my @now = $gmt ? gmtime : localtime;