lib/elasticsearch/api/actions/ping.rb in elasticsearch-api-1.0.9 vs lib/elasticsearch/api/actions/ping.rb in elasticsearch-api-1.0.10

- old
+ new

@@ -14,16 +14,12 @@ method = HTTP_HEAD path = "" params = {} body = nil - perform_request(method, path, params, body).status == 200 ? true : false - rescue Exception => e - if e.class.to_s =~ /NotFound/ || e.message =~ /Not\s*Found|404/i - false - else - raise e - end + Utils.__rescue_from_not_found do + perform_request(method, path, params, body).status == 200 ? true : false + end end end end end