| 1234567891011121314151617181920212223242526272829 |
- <?php
- namespace Elastica\Exception;
- use Elastica\JSON;
- use Elastica\Request;
- use Elastica\Response;
- /**
- * Partial shard failure exception.
- *
- * @author Ian Babrou <ibobrik@gmail.com>
- */
- class PartialShardFailureException extends ResponseException
- {
- /**
- * Construct Exception.
- *
- * @param \Elastica\Request $request
- * @param \Elastica\Response $response
- */
- public function __construct(Request $request, Response $response)
- {
- parent::__construct($request, $response);
- $shardsStatistics = $response->getShardsStatistics();
- $this->message = JSON::stringify($shardsStatistics);
- }
- }
|