From 1a365e77dfb8825136626202b1df462731b42060 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 16 Aug 2015 08:22:05 +0200 Subject: Update to MediaWiki 1.25.2 --- .../Exception/PartialShardFailureException.php | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 vendor/ruflin/elastica/lib/Elastica/Exception/PartialShardFailureException.php (limited to 'vendor/ruflin/elastica/lib/Elastica/Exception/PartialShardFailureException.php') diff --git a/vendor/ruflin/elastica/lib/Elastica/Exception/PartialShardFailureException.php b/vendor/ruflin/elastica/lib/Elastica/Exception/PartialShardFailureException.php new file mode 100644 index 00000000..f853bf96 --- /dev/null +++ b/vendor/ruflin/elastica/lib/Elastica/Exception/PartialShardFailureException.php @@ -0,0 +1,33 @@ + + */ +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['failed']); + } + +} -- cgit v1.2.2