Skip to content

Commit

Permalink
Don't capture exceptions into locals if we're not going to use them.
Browse files Browse the repository at this point in the history
  • Loading branch information
Empact committed Aug 14, 2011
1 parent 2f39602 commit 8ea88fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/spatial_adapter/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class SpatialMysqlColumn < MysqlColumn
def self.string_to_geometry(string)
return string unless string.is_a?(String)
GeoRuby::SimpleFeatures::Geometry.from_ewkb(string[4..-1])
rescue Exception => exception
rescue Exception
nil
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/spatial_adapter/mysql2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class SpatialMysql2Column < Mysql2Column
def self.string_to_geometry(string)
return string unless string.is_a?(String)
GeoRuby::SimpleFeatures::Geometry.from_ewkb(string[4..-1])
rescue Exception => exception
rescue Exception
nil
end
end
Expand Down

0 comments on commit 8ea88fb

Please sign in to comment.