diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-01-12 15:41:33 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-01-12 15:41:33 +0100 |
commit | a4f855c7f7d6fba7b6c249ecb174cb79acd55fad (patch) | |
tree | 66a3fd70ec565f59c82ac3b06f40d578e55355cf /lib/Travel/Routing | |
parent | abdf3cffa33ffb96d5cc58014907f750321632ff (diff) |
Improve unparsable route data error message, and two-way trips to limitations
Diffstat (limited to 'lib/Travel/Routing')
-rw-r--r-- | lib/Travel/Routing/DE/VRR.pm | 4 |
1 files changed, 2 insertions, 2 deletions
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(); } |