Exception: ActiveRecord::SQLWarning

Inherits:
ActiveRecordError show all
Defined in:
activerecord/lib/active_record/errors.rb

Overview

Raised when a statement produces an SQL warning.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, code = nil, level = nil, sql = nil) ⇒ SQLWarning

Returns a new instance of SQLWarning.



265
266
267
268
269
270
# File 'activerecord/lib/active_record/errors.rb', line 265

def initialize(message = nil, code = nil, level = nil, sql = nil)
  super(message)
  @code = code
  @level = level
  @sql = sql
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code



262
263
264
# File 'activerecord/lib/active_record/errors.rb', line 262

def code
  @code
end

#levelObject (readonly)

Returns the value of attribute level



262
263
264
# File 'activerecord/lib/active_record/errors.rb', line 262

def level
  @level
end

#sqlObject

Returns the value of attribute sql



263
264
265
# File 'activerecord/lib/active_record/errors.rb', line 263

def sql
  @sql
end