Class: Informix::ExcInfo
- Inherits:
-
Struct
- Object
- Struct
- Informix::ExcInfo
- Defined in:
- lib/informix/exceptions.rb,
lib/informix/exceptions.rb
Overview
The ExcInfo
class works as an object representation of an Informix error state
Constant Summary collapse
- FORMAT =
"%-15s: %s\n".freeze
Instance Attribute Summary collapse
-
#class_origin ⇒ Object
Returns the value of attribute class_origin.
-
#connection_name ⇒ Object
Returns the value of attribute connection_name.
-
#message ⇒ Object
Returns the value of attribute message.
-
#server_name ⇒ Object
Returns the value of attribute server_name.
-
#sql_code ⇒ Object
Returns the value of attribute sql_code.
-
#sql_state ⇒ Object
Returns the value of attribute sql_state.
-
#subclass_origin ⇒ Object
Returns the value of attribute subclass_origin.
Instance Method Summary collapse
-
#to_s ⇒ Object
excinfo.to_s => string.
Instance Attribute Details
#class_origin ⇒ Object
Returns the value of attribute class_origin
36 37 38 |
# File 'lib/informix/exceptions.rb', line 36 def class_origin @class_origin end |
#connection_name ⇒ Object
Returns the value of attribute connection_name
36 37 38 |
# File 'lib/informix/exceptions.rb', line 36 def connection_name @connection_name end |
#message ⇒ Object
Returns the value of attribute message
36 37 38 |
# File 'lib/informix/exceptions.rb', line 36 def @message end |
#server_name ⇒ Object
Returns the value of attribute server_name
36 37 38 |
# File 'lib/informix/exceptions.rb', line 36 def server_name @server_name end |
#sql_code ⇒ Object
Returns the value of attribute sql_code
36 37 38 |
# File 'lib/informix/exceptions.rb', line 36 def sql_code @sql_code end |
#sql_state ⇒ Object
Returns the value of attribute sql_state
36 37 38 |
# File 'lib/informix/exceptions.rb', line 36 def sql_state @sql_state end |
#subclass_origin ⇒ Object
Returns the value of attribute subclass_origin
36 37 38 |
# File 'lib/informix/exceptions.rb', line 36 def subclass_origin @subclass_origin end |
Instance Method Details
#to_s ⇒ Object
excinfo.to_s => string
Returns a string representation of the error.
47 48 49 50 51 52 53 |
# File 'lib/informix/exceptions.rb', line 47 def to_s ret = "\n" each_pair do |member, value| ret += sprintf(FORMAT, member.to_s, value) end ret end |