diff --git a/lib/spatial_adapter/mysql.rb b/lib/spatial_adapter/mysql.rb index c9c56db..6c13a8b 100644 --- a/lib/spatial_adapter/mysql.rb +++ b/lib/spatial_adapter/mysql.rb @@ -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 diff --git a/lib/spatial_adapter/mysql2.rb b/lib/spatial_adapter/mysql2.rb index 2535d2d..0152860 100644 --- a/lib/spatial_adapter/mysql2.rb +++ b/lib/spatial_adapter/mysql2.rb @@ -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