Skip to content
Snippets Groups Projects
Commit 870d3aec authored by Alex Reisner's avatar Alex Reisner
Browse files

Allow raise_error to take a message.

parent a3bebdaf
No related branches found
No related tags found
No related merge requests found
...@@ -93,11 +93,12 @@ module Geocoder ...@@ -93,11 +93,12 @@ module Geocoder
## ##
# Raise exception instead of warning for specified exceptions. # Raise exception instead of warning for specified exceptions.
# #
def raise_error(err) def raise_error(error, message = nil)
raise err if Geocoder::Configuration.always_raise.include?(err.class) if Geocoder::Configuration.always_raise.include?(error.class)
raise error, message
end
end end
## ##
# Returns a parsed search result (Ruby hash). # Returns a parsed search result (Ruby hash).
# #
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment