123456789_123456789_123456789_123456789_123456789_

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

Instance Method Summary

Constructor Details

.new(msg = nil, connection: nil, result: nil) ⇒ Error

[ GitHub ]

  
# 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.

[ GitHub ]