end
render :action => "results"
- rescue Exception => ex
+ rescue StandardError => ex
@error = "Error contacting rpc.geocoder.us: #{ex}"
render :action => "error"
end
end
render :action => "results"
- rescue Exception => ex
+ rescue StandardError => ex
@error = "Error contacting www.npemap.org.uk: #{ex}"
render :action => "error"
end
end
render :action => "results"
- rescue Exception => ex
+ rescue StandardError => ex
@error = "Error contacting geocoder.ca: #{ex}"
render :action => "error"
end
end
# get objects to excude
- if params[:exclude]
- exclude = "&exclude_place_ids=#{params[:exclude]}"
- end
+ exclude = "&exclude_place_ids=#{params[:exclude]}" if params[:exclude]
# ask nominatim
response = fetch_xml("http:#{NOMINATIM_URL}search?format=xml&q=#{escape_query(query)}#{viewbox}#{exclude}&accept-language=#{http_accept_language.user_preferred_languages.join(',')}")
end
render :action => "results"
- # rescue Exception => ex
+ # rescue StandardError => ex
# @error = "Error contacting nominatim.openstreetmap.org: #{ex.to_s}"
# render :action => "error"
end
end
render :action => "results"
- rescue Exception => ex
+ rescue StandardError => ex
@error = "Error contacting ws.geonames.org: #{ex}"
render :action => "error"
end
end
render :action => "results"
- rescue Exception => ex
+ rescue StandardError => ex
@error = "Error contacting nominatim.openstreetmap.org: #{ex}"
render :action => "error"
end
end
render :action => "results"
- rescue Exception => ex
+ rescue StandardError => ex
@error = "Error contacting ws.geonames.org: #{ex}"
render :action => "error"
end