From b39bf3793c756809755b3220b58f255913a14b08 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 6 Oct 2015 19:03:07 +0200 Subject: slightly improved error messages --- bin/aseag-m | 11 ++++++----- 1 file 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 - ] + ], ); } -- cgit v1.2.3