From 0defab783130c6ad24c29e85f6d8857cb2f12230 Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Fri, 29 Dec 2023 08:41:30 -0500 Subject: [PATCH] Better message on dbpedia connection failure --- gedcom | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gedcom b/gedcom index 654e72f..8882df3 100755 --- a/gedcom +++ b/gedcom @@ -12439,8 +12439,9 @@ sub dbpedia $surname = 'NULL'; } - print "https://lookup.dbpedia.org/api/search?query=$firstname%20$surname\n" if($opts{'v'}); - if(($firstname ne '?') && (my $resp = $cached_browser->get("https://lookup.dbpedia.org/api/search?query=$firstname%20$surname"))) { + my $url = "https://lookup.dbpedia.org/api/search?query=$firstname%20$surname"; + print "$url\n" if($opts{'v'}); + if(($firstname ne '?') && (my $resp = $cached_browser->get($url))) { if($resp->is_success()) { if(my $arrayofresults = XML::Hash->new()->fromXMLStringtoHash($resp->decoded_content())->{'ArrayOfResults'}) { RESULT: foreach my $result(@{$arrayofresults->{'Result'}}) { @@ -12606,7 +12607,7 @@ sub dbpedia } } } else { - complain({ person => $person, warning => "dbpedia: $firstname $surname failed: " . $resp->status_line() }); + complain({ person => $person, warning => "$url: $firstname $surname failed: " . $resp->status_line() }); } } }