Doc #60055 [Asn->Csd]: SolrClient::Ping throws both E_ERROR and SolrClientException
| From: | omars@php.net | Date: | Sun, 11 Jan 2015 22:05:31 +0000 |
| Subject: | Doc #60055 [Asn->Csd]: SolrClient::Ping throws both E_ERROR and SolrClientException | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11845@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60055&edit=1
ID: 60055
Updated by: omars@php.net
Reported by: gcontreras at digbang dot com
Summary: SolrClient::Ping throws both E_ERROR and
SolrClientException
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: solr
Operating System: Any
PHP Version: Irrelevant
Assigned To: omars
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2014-06-29 15:22:46] omars@php.net
fixed
------------------------------------------------------------------------
[2011-10-13 15:45:35] gcontreras at digbang dot com
Description:
------------
---
From manual page: http://www.php.net/solrclient.ping#refsect1-solrclient.ping-returnvalues
---
The SolrClient::Ping function will throw a E_ERROR if the client can't connect to the Solr
Server. If this error is handled, the function will throw the SolrClientException as documented.
May also refer to: https://bugs.php.net/bug.php?id=59511
Test script:
---------------
$options = array(
...
);
$solr = new SolrClient($options);
$solr->ping(); //Will throw E_ERROR
set_error_handler(...);
$solr->ping(); //Will throw SolrClientException
Expected result:
----------------
I believe the ping function shouldn't throw a E_ERROR, as it complicates code where an
application is not dependant on Solr.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60055&edit=1