summaryrefslogtreecommitdiff
path: root/bin/aseag-m
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-10-06 19:03:07 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-10-06 19:03:07 +0200
commitb39bf3793c756809755b3220b58f255913a14b08 (patch)
treeb394f2341fb700f24c8459fbaaae474849f451bf /bin/aseag-m
parent4604cbdbc219d7c42ea9b3f0e98208ae44527232 (diff)
slightly improved error messages
Diffstat (limited to 'bin/aseag-m')
-rwxr-xr-xbin/aseag-m11
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/aseag-m b/bin/aseag-m
index 529d9d1..6405509 100755
--- a/bin/aseag-m
+++ b/bin/aseag-m
@@ -103,15 +103,16 @@ sub get_exact_stop_name {
my @stops = $status->get_stop_by_name($fuzzy_name);
if ( @stops == 0 ) {
- say STDERR "No stops match '$fuzzy_name'";
+ say STDERR "Got no departures for '$fuzzy_name'";
+ say STDERR 'The stop may not exist or not be in service right now';
exit(3);
}
elsif ( @stops == 1 ) {
return $stops[0];
}
else {
- say STDERR "The stop '$fuzzy_name' is ambiguous. Please choose one "
- . 'of the following:';
+ say STDERR "The stop name '$fuzzy_name' is ambiguous. Please choose "
+ . 'one of the following:';
say STDERR join( "\n", @stops );
exit(3);
}
@@ -156,7 +157,7 @@ sub show_results {
$_->[1]
]
} $d->route_timetable
- ]
+ ],
);
}
else {
@@ -168,7 +169,7 @@ sub show_results {
map {
[ $_->[0]->strftime($strftime_format), q{}, $_->[1] ]
} $d->route_timetable
- ]
+ ],
);
}