Exception: ActiveRecord::SQLWarning
- Inherits:
-
ActiveRecordError
- Object
- StandardError
- ActiveRecordError
- ActiveRecord::SQLWarning
- Defined in:
- activerecord/lib/active_record/errors.rb
Overview
Raised when a statement produces an SQL warning.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#sql ⇒ Object
Returns the value of attribute sql.
Instance Method Summary collapse
-
#initialize(message = nil, code = nil, level = nil, sql = nil) ⇒ SQLWarning
constructor
A new instance of SQLWarning.
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( = nil, code = nil, level = nil, sql = nil) super() @code = code @level = level @sql = sql end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code
262 263 264 |
# File 'activerecord/lib/active_record/errors.rb', line 262 def code @code end |
#level ⇒ Object (readonly)
Returns the value of attribute level
262 263 264 |
# File 'activerecord/lib/active_record/errors.rb', line 262 def level @level end |
#sql ⇒ Object
Returns the value of attribute sql
263 264 265 |
# File 'activerecord/lib/active_record/errors.rb', line 263 def sql @sql end |