Skip to content
Snippets Groups Projects
Commit 6743caad authored by Ahmed Adam's avatar Ahmed Adam Committed by Alex Reisner
Browse files

Add 'error handling' section to readme

parent 8626ead4
No related branches found
No related tags found
No related merge requests found
......@@ -446,6 +446,13 @@ Geocoder comes with a test suite (just run <tt>rake test</tt>) that mocks Active
http://github.com/alexreisner/geocoder_test
== Error Handling
By default Geocoder will rescue any exceptions raised by calls to the geocoding service and return an empty array (using warn() to inform you of the error). You can override this and implement custom error handling for certain exceptions by using the <tt>:always_raise</tt> option:
Geocoder::Configuration.always_raise = [SocketError, TimeoutError]
== Known Issue
You cannot use the +near+ scope with another scope that provides an +includes+ option because the +SELECT+ clause generated by +near+ will overwrite it (or vice versa). Instead, try using +joins+ and pass a <tt>:select</tt> option to the +near+ scope to get the columns you want. For example:
......
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