From 53fcd15fe7667628f4d5c4f2c1b2dc49f174d67c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 28 Sep 2015 18:06:25 +0200 Subject: EFA: Handle ambiguous input properly (explicit accessors for candidate lists) --- bin/efa-m | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bin') diff --git a/bin/efa-m b/bin/efa-m index 5e2c68d..28fd2ad 100755 --- a/bin/efa-m +++ b/bin/efa-m @@ -338,6 +338,16 @@ $efa = new_efa_by_url($efa_url); if ( my $err = $efa->errstr ) { say STDERR "Request error: ${err}"; + + if ( $efa->place_candidates ) { + say 'You might want to try one of the following places:'; + say join( "\n", $efa->place_candidates ); + } + elsif ( $efa->name_candidates ) { + say 'You might want to try one of the following names:'; + say join( "\n", $efa->name_candidates ); + } + exit 2; } -- cgit v1.2.3