From a4f855c7f7d6fba7b6c249ecb174cb79acd55fad Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 12 Jan 2014 15:41:33 +0100 Subject: Improve unparsable route data error message, and two-way trips to limitations --- lib/Travel/Routing/DE/VRR.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Travel/Routing/DE/VRR.pm b/lib/Travel/Routing/DE/VRR.pm index 665d5bc..c7193e1 100644 --- a/lib/Travel/Routing/DE/VRR.pm +++ b/lib/Travel/Routing/DE/VRR.pm @@ -26,7 +26,7 @@ use Exception::Class ( }, 'Travel::Routing::DE::VRR::Exception::NoData' => { isa => 'Travel::Routing::DE::VRR::Exception', - description => 'got no data to parse', + description => 'backend returned no parsable route', }, 'Travel::Routing::DE::VRR::Exception::Ambiguous' => { isa => 'Travel::Routing::DE::VRR::Exception', @@ -590,7 +590,7 @@ sub parse { $self->parse_part($part); } - if ( @{ $self->{routes} } == 0 ) { + if ( not defined $self->{routes} or @{ $self->{routes} } == 0 ) { Travel::Routing::DE::VRR::Exception::NoData->throw(); } -- cgit v1.2.3