note 119816 rejected from solrclient.construct by cmb
| From: | cmb@php.net | Date: | Wed, 31 Aug 2016 17:06:59 +0000 |
| Subject: | note 119816 rejected from solrclient.construct by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206434@lists.php.net to get a copy of this message | ||
Note Submitter: davidvartanian at posteo dot de
----
If the specified path is inexistent it throws a warning AND an exception.
Is there any possibility to throw only the exception?
<?php
$options = ['hostname' => 'localhost', 'port' => 8983,
'path' => 'solr/inexistentcore'];
$client = new SolrClient($options);
$client->ping(); // this throws both a warning and an exception!
?>