Skip to content

Commit c68e219

Browse files
alexander-schranzezimuel
authored andcommitted
Better exception message for Could not parse URI
1 parent 2e40471 commit c68e219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Elasticsearch/ClientBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ private function extractURIParts($host)
651651
$parts = parse_url($host);
652652

653653
if ($parts === false) {
654-
throw new InvalidArgumentException("Could not parse URI");
654+
throw new InvalidArgumentException(sprintf('Could not parse URI: "%s"', $host));
655655
}
656656

657657
if (isset($parts['port']) !== true) {

0 commit comments

Comments
 (0)