method

translate_exception

Importance_0
v5.0.0.1 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters
translate_exception(exception, message) protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 730
      def translate_exception(exception, message)
        case error_number(exception)
        when 1062
          RecordNotUnique.new(message)
        when 1452
          InvalidForeignKey.new(message)
        when 1406
          ValueTooLong.new(message)
        else
          super
        end
      end
Register or log in to add new notes.