From a48100e2921bd88ff51f69b9c898ef69156fd044 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 9 Apr 2020 13:42:34 +0200 Subject: [PATCH] Better exception message for Could not parse URI --- src/Elasticsearch/ClientBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Elasticsearch/ClientBuilder.php b/src/Elasticsearch/ClientBuilder.php index 285e4d48d..b17333dbc 100644 --- a/src/Elasticsearch/ClientBuilder.php +++ b/src/Elasticsearch/ClientBuilder.php @@ -670,7 +670,7 @@ private function extractURIParts($host) $parts = parse_url($host); if ($parts === false) { - throw new InvalidArgumentException("Could not parse URI"); + throw new InvalidArgumentException(sprintf('Could not parse URI: "%s"', $host)); } if (isset($parts['port']) !== true) {