Permalink
Browse files

Raise errors (if configured) to let the developer using the gem handl…

…e them
  • Loading branch information...
1 parent df0ee95 commit 1ac549e5f5b5cc5220ba93bf34a19e389715cd5a @lukeledet committed Sep 12, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/geocoder/lookups/freegeoip.rb
@@ -11,7 +11,8 @@ def results(query, reverse = false)
return [reserved_result(query)] if loopback_address?(query)
begin
return (doc = fetch_data(query, reverse)) ? [doc] : []
- rescue StandardError # Freegeoip.net returns HTML on bad request
+ rescue StandardError => err # Freegeoip.net returns HTML on bad request
+ raise_error(err)
return []
end
end

0 comments on commit 1ac549e

Please sign in to comment.