1<?php 2 3namespace Elastica\Exception; 4 5use Elastica\JSON; 6use Elastica\Request; 7use Elastica\Response; 8 9/** 10 * Partial shard failure exception. 11 * 12 * @author Ian Babrou <ibobrik@gmail.com> 13 */ 14class PartialShardFailureException extends ResponseException 15{ 16 /** 17 * Construct Exception. 18 */ 19 public function __construct(Request $request, Response $response) 20 { 21 parent::__construct($request, $response); 22 23 $shardsStatistics = $response->getShardsStatistics(); 24 $this->message = JSON::stringify($shardsStatistics); 25 } 26} 27