Commit 2c41eece authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

IRIS.pm: Errorhandling for stations without associated timetable

parent 7e8d766d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -49,6 +49,12 @@ sub new {

	$self->{nodes}{station} = ( $xml_st->findnodes('//station') )[0];

	if ( not $self->{node}->{station} ) {
		$self->{errstr}
		  = "The station '$opt{station}' has no associated timetable";
		return $self;
	}

	my $dt_req = $self->{datetime}->clone;
	for ( 1 .. 3 ) {
		$self->get_timetable( $self->{nodes}{station}->getAttribute('eva'),