Leadformance/geokit-premier-gem — pull request #2 by mfilej (2014-01-17 11:56:02+00:00)
Title: Make sure exception is fully logged when rescued

I was tempted to actually raise the exception, but it might not be safe since we don't know what goes on under there.

The logged exception will look like this:

An error has occurred during geocoding: Address: 'kozana 115'. Provider: 'lol'. Exception:
uninitialized constant Geokit::Geocoders::LolGeocoder
/Users/miha/Leadformance/geokit-premier-gem/lib/geokit/geocoders.rb:879:in `const_get'
/Users/miha/Leadformance/geokit-premier-gem/lib/geokit/geocoders.rb:879:in `block in do_geocode'
/Users/miha/Leadformance/geokit-premier-gem/lib/geokit/geocoders.rb:877:in `each'
/Users/miha/Leadformance/geokit-premier-gem/lib/geokit/geocoders.rb:877:in `do_geocode'
/Users/miha/Leadformance/geokit-premier-gem/lib/geokit/geocoders.rb:135:in `geocode'
(pry):4:in `

'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb:328:in `eval'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb:328:in `evaluate_ruby'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb:278:in `re'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb:254:in `rep'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb:234:in `block (3 levels) in repl'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb:232:in `loop'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb:232:in `block (2 levels) in repl'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb:231:in `catch'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb:231:in `block in repl'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb:230:in `catch'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_instance.rb:230:in `repl'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-0.9.12.2/lib/pry/pry_class.rb:170:in `start'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/gems/pry-debugger-0.2.2/lib/pry-debugger/pry_ext.rb:19:in `start_with_pry_debugger'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/bundler/gems/rails-3a429e6b5daf/railties/lib/rails/commands/console.rb:47:in `start'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/bundler/gems/rails-3a429e6b5daf/railties/lib/rails/commands/console.rb:8:in `start'
/Users/miha/Leadformance/Bridge2/vendor/ruby/1.9.1/bundler/gems/rails-3a429e6b5daf/railties/lib/rails/commands.rb:41:in `'