Sha256: 584d08ce5ccf440c267611fe2d63d1719f0b3b9ba6916c668244366bc63317e2

Contents?: true

Size: 846 Bytes

Versions: 17

Compression:

Stored size: 846 Bytes

Contents

# -*- ruby -*-
# frozen_string_literal: true

require 'pg' unless defined?( PG )


module PG

	class Error < StandardError
		def initialize(msg=nil, connection: nil, result: nil)
			@connection = connection
			@result = result
			super(msg)
		end
	end

	class NotAllCopyDataRetrieved < PG::Error
	end
	class LostCopyState < PG::Error
	end
	class NotInBlockingMode < PG::Error
	end

	# PG::Connection#transaction uses this exception to distinguish a deliberate rollback from other exceptional situations.
	# Normally, raising an exception will cause the .transaction method to rollback the database transaction and pass on the exception.
	# But if you raise an PG::RollbackTransaction exception, then the database transaction will be rolled back, without passing on the exception.
	class RollbackTransaction < StandardError
	end

end # module PG

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pg-1.6.0.rc1-x86_64-linux lib/pg/exceptions.rb
pg-1.6.0.rc1-x86-mingw32 lib/pg/exceptions.rb
pg-1.6.0.rc1-x64-mingw32 lib/pg/exceptions.rb
pg-1.6.0.rc1-x64-mingw-ucrt lib/pg/exceptions.rb
pg-1.6.0.rc1 lib/pg/exceptions.rb
pg-1.5.9-x86-mingw32 lib/pg/exceptions.rb
pg-1.5.9-x64-mingw32 lib/pg/exceptions.rb
pg-1.5.9-x64-mingw-ucrt lib/pg/exceptions.rb
pg-1.5.9 lib/pg/exceptions.rb
pg-1.5.8-x64-mingw32 lib/pg/exceptions.rb
pg-1.5.8-x64-mingw-ucrt lib/pg/exceptions.rb
pg-1.5.8-x86-mingw32 lib/pg/exceptions.rb
pg-1.5.8 lib/pg/exceptions.rb
pg-1.5.7-x86-mingw32 lib/pg/exceptions.rb
pg-1.5.7-x64-mingw32 lib/pg/exceptions.rb
pg-1.5.7-x64-mingw-ucrt lib/pg/exceptions.rb
pg-1.5.7 lib/pg/exceptions.rb