Exception: ActiveRecord::SQLWarning

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

Overview

Raised when a statement produces an SQL warning.

Instance Attribute Summary collapse

Attributes inherited from AdapterError

#connection_pool

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of SQLWarning.



296
297
298
299
300
301
# File 'lib/active_record/errors.rb', line 296

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



293
294
295
# File 'lib/active_record/errors.rb', line 293

def code
  @code
end

#levelObject (readonly)

Returns the value of attribute level.



293
294
295
# File 'lib/active_record/errors.rb', line 293

def level
  @level
end

#sqlObject

Returns the value of attribute sql.



294
295
296
# File 'lib/active_record/errors.rb', line 294

def sql
  @sql
end