summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-11-09 17:08:35 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-11-09 17:08:35 +0100
commitff0e54c30add2246e5cf7c80ebcb476be9bef3ca (patch)
treee9d7a14138df67c9bac942070c4aced91b15d0a7
parent2d1f3bcd683052ecaad75ead72cf7c3e595e8eb5 (diff)
HAFAS: Handle H9380
-rwxr-xr-xbin/hafas22
1 files changed, 13 insertions, 9 deletions
diff --git a/bin/hafas b/bin/hafas
index fd174d8..5c57d3e 100755
--- a/bin/hafas
+++ b/bin/hafas
@@ -292,16 +292,20 @@ sub show_message {
if ( my $err = $hafas->errstr ) {
say STDERR "Request error: ${err}";
- if ( $hafas->errcode
- and ( $hafas->errcode eq 'H730' or $hafas->errcode eq 'LOCATION' ) )
- {
- show_similar_stops();
- }
- elsif ( $hafas->errcode and $hafas->errcode eq 'H890' ) {
- say q{};
- say 'HAFAS was unable to find suitable connections.';
- say
+ if ( $hafas->errcode ) {
+ if ( $hafas->errcode eq 'H730' or $hafas->errcode eq 'LOCATION' ) {
+ show_similar_stops();
+ }
+ elsif ( $hafas->errcode eq 'H890' ) {
+ say q{};
+ say 'HAFAS was unable to find suitable connections.';
+ say
'Maybe your mode of transport (-m) or change (-c / -C) filters are too restrictive?';
+ }
+ elsif ( $hafas->errcode eq 'H9380' ) {
+ say q{};
+ say 'Arrival / departure / intermediate stops must not overlap.';
+ }
}
exit 2;
}