lib/geocoder/lookups/base.rb in geocoder-1.1.2 vs lib/geocoder/lookups/base.rb in geocoder-1.1.3

- old
+ new

@@ -1,6 +1,7 @@ require 'net/http' +require 'net/https' require 'uri' unless defined?(ActiveSupport::JSON) begin require 'rubygems' # for Ruby 1.8 @@ -97,10 +98,11 @@ ## # Raise exception if configuration specifies it should be raised. # Return false if exception not raised. # def raise_error(error, message = nil) - if Geocoder::Configuration.always_raise.include?( error.is_a?(Class) ? error : error.class ) + exceptions = Geocoder::Configuration.always_raise + if exceptions == :all or exceptions.include?( error.is_a?(Class) ? error : error.class ) raise error, message else false end end