From: epg <> Date: Sat, 28 Dec 2002 01:26:49 +0000 (+0000) Subject: Idiot. Put error messages to STDERR where they belong. X-Git-Url: https://diplodocus.org/git/minc/commitdiff_plain/8dbe8d04c7cc211f3cc7a832b2072d44ade0b290 Idiot. Put error messages to STDERR where they belong. --- diff --git a/minc b/minc index 04a7d68..6efc7fd 100755 --- a/minc +++ b/minc @@ -264,12 +264,12 @@ sub log_headers { # Utility procedures sub _errprint { - printf('%s:%s', __FILE__, __LINE__); + printf(STDERR '%s:%s', __FILE__, __LINE__); if (@_) { - print(': '); + print(STDERR ': '); foreach (@_) { - print; + print(STDERR); } } } @@ -278,7 +278,7 @@ sub err { my $ex = shift; _errprint(@_); - print(": $!\n"); + print(STDERR ": $!\n"); exit($ex); } @@ -287,7 +287,7 @@ sub errx { my $ex = shift; _errprint(@_); - print("\n"); + print(STDERR "\n"); exit($ex); } @@ -477,7 +477,7 @@ sub get_headers { # folded header continuation if (not defined($current)) { - print("Malformed message, cannot parse headers.\n"); + print(STDERR "Malformed message, cannot parse headers.\n"); return (); }