README.md in elasticsearch-transport-1.0.4 vs README.md in elasticsearch-transport-1.0.5

- old
+ new

@@ -321,9 +321,26 @@ The serialization component is pluggable, though, so you can write your own by including the {Elasticsearch::Transport::Transport::Serializer::Base} module, implementing the required contract, and passing it to the client as the `serializer_class` or `serializer` parameter. +### Exception Handling + +The library defines a [number of exception classes](https://github.com/elasticsearch/elasticsearch-ruby/blob/master/elasticsearch-transport/lib/elasticsearch/transport/transport/errors.rb) +for various client and server errors, as well as unsuccessful HTTP responses, +making it possible to `rescue` specific exceptions with desired granularity. + +The highest-level exception is {Elasticsearch::Transport::Transport::Error} +and will be raised for any generic client *or* server errors. + +{Elasticsearch::Transport::Transport::ServerError} will be raised for server errors only. + +As an example for response-specific errors, a `404` response status will raise +an {Elasticsearch::Transport::Transport::Errors::NotFound} exception. + +Finally, {Elasticsearch::Transport::Transport::SnifferTimeoutError} will be raised +when connection reloading ("sniffing") times out. + ## Development and Community For local development, clone the repository and run `bundle install`. See `rake -T` for a list of available Rake tasks for running tests, generating documentation, starting a testing cluster, etc.