From f15ca028596a9226fcff636138533a1a39f39ce5 Mon Sep 17 00:00:00 2001 From: Joseph Bielawski Date: Mon, 31 Mar 2014 11:59:37 +0200 Subject: [PATCH] Fix documentation for client overwriting. --- .../doc/cookbook/suppress-server-errors.md | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/Resources/doc/cookbook/suppress-server-errors.md b/Resources/doc/cookbook/suppress-server-errors.md index aa74276..d89ffd6 100644 --- a/Resources/doc/cookbook/suppress-server-errors.md +++ b/Resources/doc/cookbook/suppress-server-errors.md @@ -1,5 +1,5 @@ Suppressing Server Errors -======================== +========================= By default, exceptions from the Elastica client library will propagate through the bundle's Client class. For instance, if the Elasticsearch server is offline, @@ -12,25 +12,44 @@ container parameter with a custom class. In the following example, we override the `Client::request()` method and return the equivalent of an empty search response if an exception occurred. -``` +Sample client code: +------------------- + +```php + + + + + Acme\ElasticaBundle\Client + + +