mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Better error messages.
This commit is contained in:
@@ -102,10 +102,13 @@ if ($settings->{landscape}) {
|
||||
$settings->{height} = $tmp;
|
||||
}
|
||||
|
||||
my $me = $0;
|
||||
$me =~ s/^.*\///;
|
||||
|
||||
# Don't read from a terminal
|
||||
if (-t STDIN) {
|
||||
print STDERR "I can't read data from a terminal. Please run like this:\n";
|
||||
print STDERR " remind -pp [options] filename | $0 [options] > out.pdf\n";
|
||||
print STDERR " remind -pp [options] filename | $me [options] > out.pdf\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -135,7 +138,7 @@ while(1) {
|
||||
if (!$obj) {
|
||||
if (!$done_one) {
|
||||
$errored_out = 1;
|
||||
print STDERR "$err\n";
|
||||
print STDERR "$me: $err\n";
|
||||
exit(1);
|
||||
}
|
||||
last;
|
||||
|
||||
@@ -100,7 +100,7 @@ sub read_one_month
|
||||
|
||||
# Old-style "remind -p"
|
||||
# TODO: Eventually support this?
|
||||
return (undef, "Format not supported: Use -pp or -ppp, not plain -p");
|
||||
return (undef, "Format not supported: Use 'remind -pp', not plain -p");
|
||||
}
|
||||
|
||||
sub read_one_month_pp
|
||||
|
||||
Reference in New Issue
Block a user