Sha256: 5bdb63baf2f0a7824bc5435d6a4ea8a0d618e0d0fa8b7242799d49f24b1c4e2d

Contents?: true

Size: 311 Bytes

Versions: 10

Compression:

Stored size: 311 Bytes

Contents

module Librails
  class MiscUtils
    def self.rescue_mysql2_error(e)
      if e.message =~ /Incorrect string value:/
        # utf8mb4にすればいいのだ…。とりあえずそのばしのぎ。
        puts e.message
      else
        puts e.message
        puts e.backtrace
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
librails-1.2.1 lib/librails/misc_utils.rb
librails-1.2.0 lib/librails/misc_utils.rb
librails-1.1.6 lib/librails/misc_utils.rb
librails-1.1.4 lib/librails/misc_utils.rb
librails-1.0.0 lib/librails/misc_utils.rb
librails-0.3.0 lib/librails/misc_utils.rb
librails-0.2.3 lib/librails/misc_utils.rb
librails-0.2.2 lib/librails/misc_utils.rb
librails-0.2.1 lib/librails/misc_utils.rb
librails-0.1.0 lib/librails/misc_utils.rb