class Net::LDAP::ConnectionError

Public Class Methods

new(errors) click to toggle source
Calls superclass method
# File lib/net/ldap/error.rb, line 7
def self.new(errors)
  error = errors.first.first
  if errors.size == 1
    return error if error.is_a? Errno::ECONNREFUSED

    return Net::LDAP::Error.new(error.message)
  end

  super
end
new(errors) click to toggle source
Calls superclass method
# File lib/net/ldap/error.rb, line 18
def initialize(errors)
  message = "Unable to connect to any given server: \n  #{errors.map { |e, h, p| "#{e.class}: #{e.message} (#{h}:#{p})" }.join("\n  ")}"
  super(message)
end