Exception: PG::Error
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::StandardError ,
Exception
|
|
Instance Chain:
self,
::StandardError ,
Exception
|
|
Inherits: |
StandardError
|
Defined in: | ext/pg.c, ext/pg_errors.c, lib/pg/exceptions.rb |
Overview
This is the exception class raised when an error is returned from a libpq API call.
The attributes #connection and #result are set to the connection object and result set object, respectively.
If the connection object or result set object is not available from the context in which the error was encountered, it is nil
.
Class Method Summary
Instance Attribute Summary
- #connection readonly
- #result readonly
Instance Method Summary
-
#error
Alias for
message
.
Constructor Details
.new(msg = nil, connection: nil, result: nil) ⇒ Error
# File 'lib/pg/exceptions.rb', line 10
def initialize(msg=nil, connection: nil, result: nil) @connection = connection @result = result super(msg) end
Instance Attribute Details
#connection (readonly)
[ GitHub ]#result (readonly)
[ GitHub ]Instance Method Details
#error
Alias for message
.