From 4caa67e1f2ca8ec055acf24f04d99da028e5c06f Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 8 Sep 2015 22:35:45 +0200 Subject: IRIS exceptions: remove misleading "server returned" part ("500 Can't connect to ..." is also possible) --- lib/Travel/Status/DE/IRIS.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm index 8f4e381..dae39b9 100644 --- a/lib/Travel/Status/DE/IRIS.pm +++ b/lib/Travel/Status/DE/IRIS.pm @@ -46,7 +46,7 @@ sub new { my $res_st = $ua->get( $self->{iris_base} . '/station/' . $opt{station} ); if ( $res_st->is_error ) { - $self->{errstr} = 'Failed to fetch station data: Server returned ' + $self->{errstr} = 'Failed to fetch station data: ' . $res_st->status_line; return $self; } @@ -188,7 +188,7 @@ sub get_timetable { } if ( $res->is_error ) { - $self->{warnstr} = 'Failed to fetch a schedule part: Server returned ' + $self->{warnstr} = 'Failed to fetch a schedule part: ' . $res->status_line; return $self; } @@ -216,7 +216,7 @@ sub get_realtime { } if ( $res->is_error ) { - $self->{warnstr} = 'Failed to fetch realtime data: Server returned ' + $self->{warnstr} = 'Failed to fetch realtime data: ' . $res->status_line; return $self; } -- cgit v1.2.3