Loading bin/hafas +13 −9 Original line number Original line Diff line number Diff line Loading @@ -292,17 +292,21 @@ sub show_message { if ( my $err = $hafas->errstr ) { if ( my $err = $hafas->errstr ) { say STDERR "Request error: ${err}"; say STDERR "Request error: ${err}"; if ( $hafas->errcode if ( $hafas->errcode ) { and ( $hafas->errcode eq 'H730' or $hafas->errcode eq 'LOCATION' ) ) if ( $hafas->errcode eq 'H730' or $hafas->errcode eq 'LOCATION' ) { { show_similar_stops(); show_similar_stops(); } } elsif ( $hafas->errcode and $hafas->errcode eq 'H890' ) { elsif ( $hafas->errcode eq 'H890' ) { say q{}; say q{}; say 'HAFAS was unable to find suitable connections.'; say 'HAFAS was unable to find suitable connections.'; say say 'Maybe your mode of transport (-m) or change (-c / -C) filters are too restrictive?'; '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; exit 2; } } Loading Loading
bin/hafas +13 −9 Original line number Original line Diff line number Diff line Loading @@ -292,17 +292,21 @@ sub show_message { if ( my $err = $hafas->errstr ) { if ( my $err = $hafas->errstr ) { say STDERR "Request error: ${err}"; say STDERR "Request error: ${err}"; if ( $hafas->errcode if ( $hafas->errcode ) { and ( $hafas->errcode eq 'H730' or $hafas->errcode eq 'LOCATION' ) ) if ( $hafas->errcode eq 'H730' or $hafas->errcode eq 'LOCATION' ) { { show_similar_stops(); show_similar_stops(); } } elsif ( $hafas->errcode and $hafas->errcode eq 'H890' ) { elsif ( $hafas->errcode eq 'H890' ) { say q{}; say q{}; say 'HAFAS was unable to find suitable connections.'; say 'HAFAS was unable to find suitable connections.'; say say 'Maybe your mode of transport (-m) or change (-c / -C) filters are too restrictive?'; '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; exit 2; } } Loading