summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r--lib/Travel/Status/DE/VRR.pm15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm
index ed97712..4617cbf 100644
--- a/lib/Travel/Status/DE/VRR.pm
+++ b/lib/Travel/Status/DE/VRR.pm
@@ -170,23 +170,30 @@ sub check_for_ambiguous {
return;
}
- if ( $e_place->getAttribute('state') eq 'list' ) {
+ my $s_place = $e_place->getAttribute('state');
+ my $s_name = $e_name->getAttribute('state');
+
+ if ( $s_place eq 'list' ) {
$self->{errstr} = sprintf(
'Ambiguous place input: %s',
join( q{ | },
map { decode( 'UTF-8', $_->textContent ) }
@{ $e_place->findnodes($xp_place_elem) } )
);
- return;
}
- if ( $e_name->getAttribute('state') eq 'list' ) {
+ if ( $s_name eq 'list' ) {
$self->{errstr} = sprintf(
'Ambiguous name input: %s',
join( q{ | },
map { decode( 'UTF-8', $_->textContent ) }
@{ $e_name->findnodes($xp_name_elem) } )
);
- return;
+ }
+ if ( $s_place eq 'notidentified' ) {
+ $self->{errstr} = 'invalid place parameter';
+ }
+ if ( $s_name eq 'notidentified' ) {
+ $self->{errstr} = 'invalid name parameter';
}
return;