diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-07-27 12:07:02 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-07-27 12:07:02 +0200 |
commit | 047cb7b3e9f694c3e6654102bff3ae2bfd457be8 (patch) | |
tree | 703020cd25a42fe538f4d9e45e1f8ee38f000fb7 /bin | |
parent | 53cf789f02f754f10650ce94e2b01997dda61a4d (diff) |
DeutscheBahn.pm: Improve error handling (add ->errstr accessor)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/db-ris | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; |