summaryrefslogtreecommitdiff
path: root/lib/Travel/Routing/DE
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-01-12 15:41:33 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-01-12 15:41:33 +0100
commita4f855c7f7d6fba7b6c249ecb174cb79acd55fad (patch)
tree66a3fd70ec565f59c82ac3b06f40d578e55355cf /lib/Travel/Routing/DE
parentabdf3cffa33ffb96d5cc58014907f750321632ff (diff)
Improve unparsable route data error message, and two-way trips to limitations
Diffstat (limited to 'lib/Travel/Routing/DE')
-rw-r--r--lib/Travel/Routing/DE/VRR.pm4
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();
}