summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-07-27 12:07:02 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-07-27 12:07:02 +0200
commit047cb7b3e9f694c3e6654102bff3ae2bfd457be8 (patch)
tree703020cd25a42fe538f4d9e45e1f8ee38f000fb7 /bin
parent53cf789f02f754f10650ce94e2b01997dda61a4d (diff)
DeutscheBahn.pm: Improve error handling (add ->errstr accessor)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/db-ris5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/db-ris b/bin/db-ris
index a61dc07..8117d39 100755
--- a/bin/db-ris
+++ b/bin/db-ris
@@ -84,6 +84,11 @@ sub display_result {
return;
}
+if ( my $err = $status->errstr ) {
+ say "Request error: ${err}";
+ exit 2;
+}
+
for my $d ( $status->results() ) {
my @via;