if (encoding != null) {
RubyEncoding rubyEncoding = RubyEncoding.newEncoding(context.runtime, encoding);
rubyMessage = (RubyString) rubyMessage.encode(context, rubyEncoding);
}
IRubyObject rubyResult = result == null ? context.nil : createResult(context, result, NULL_ARRAY, Block.NULL_BLOCK);
IRubyObject exception = klass.newInstance(context, rubyMessage, rubyResult, Block.NULL_BLOCK);
return new RaiseException((RubyException) exception);
}
/****** PG::Connection INSTANCE METHODS: Connection Control ******/