From 6743caadf201147e964b679e32012b53653cf08e Mon Sep 17 00:00:00 2001 From: Ahmed Adam <aa9409@gmail.com> Date: Thu, 12 May 2011 18:02:42 +0100 Subject: [PATCH] Add 'error handling' section to readme --- README.rdoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.rdoc b/README.rdoc index ecea4285..c12e3ae6 100644 --- a/README.rdoc +++ b/README.rdoc @@ -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: -- GitLab