mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-19 15:54:22 +02:00
Better error messages.
This commit is contained in:
+5
-2
@@ -102,10 +102,13 @@ if ($settings->{landscape}) {
|
|||||||
$settings->{height} = $tmp;
|
$settings->{height} = $tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $me = $0;
|
||||||
|
$me =~ s/^.*\///;
|
||||||
|
|
||||||
# Don't read from a terminal
|
# Don't read from a terminal
|
||||||
if (-t STDIN) {
|
if (-t STDIN) {
|
||||||
print STDERR "I can't read data from a terminal. Please run like this:\n";
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +138,7 @@ while(1) {
|
|||||||
if (!$obj) {
|
if (!$obj) {
|
||||||
if (!$done_one) {
|
if (!$done_one) {
|
||||||
$errored_out = 1;
|
$errored_out = 1;
|
||||||
print STDERR "$err\n";
|
print STDERR "$me: $err\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
last;
|
last;
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ sub read_one_month
|
|||||||
|
|
||||||
# Old-style "remind -p"
|
# Old-style "remind -p"
|
||||||
# TODO: Eventually support this?
|
# 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
|
sub read_one_month_pp
|
||||||
|
|||||||
Reference in New Issue
Block a user