class Geocoder::Lookup::Base
def fetch_data(query)
Returns a parsed search result (Ruby hash).
#
def fetch_data(query) parse_raw_data fetch_raw_data(query) rescue SocketError => err raise_error(err) or Geocoder.log(:warn, "Geocoding API connection cannot be established.") rescue Errno::ECONNREFUSED => err raise_error(err) or Geocoder.log(:warn, "Geocoding API connection refused.") rescue Geocoder::NetworkError => err raise_error(err) or Geocoder.log(:warn, "Geocoding API connection is either unreacheable or reset by the peer") rescue Timeout::Error => err raise_error(err) or Geocoder.log(:warn, "Geocoding API not responding fast enough " + "(use Geocoder.configure(:timeout => ...) to set limit).") end