Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Catch weird error messages better

  • Loading branch information...
commit 38c5cf6d3fa97f4cb4faf26176cce517b0d54615 1 parent 7c3ef3e
@kyledrake kyledrake authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/geoloqi/session.rb
  2. +1 −1  lib/geoloqi/version.rb
View
2  lib/geoloqi/session.rb
@@ -48,7 +48,7 @@ def run(meth, path, query=nil, headers={})
if hash.is_a?(Hash) && hash['error'] && @config.throw_exceptions
if @config.use_dynamic_exceptions && !hash['error'].nil? && !hash['error'].empty?
- exception_class_name = hash['error'].split('_').collect {|w| w.capitalize}.join+'Error'
+ exception_class_name = hash['error'].gsub(/\W+/, '_').split('_').collect {|w| w.capitalize}.join+'Error'
Geoloqi.const_set exception_class_name, Class.new(Geoloqi::ApiError) unless Geoloqi.const_defined? exception_class_name
raise_class = Geoloqi.const_get exception_class_name
else
View
2  lib/geoloqi/version.rb
@@ -1,5 +1,5 @@
module Geoloqi
def self.version
- '0.9.31'
+ '0.9.32'
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.