Exception: Net::LDAP::ConnectionError
- Defined in:
- lib/net/ldap/error.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(errors) ⇒ ConnectionError
constructor
A new instance of ConnectionError.
Constructor Details
#initialize(errors) ⇒ ConnectionError
Returns a new instance of ConnectionError.
18 19 20 21 |
# File 'lib/net/ldap/error.rb', line 18 def initialize(errors) = "Unable to connect to any given server: \n #{errors.map { |e, h, p| "#{e.class}: #{e.message} (#{h}:#{p})" }.join("\n ")}" super() end |
Class Method Details
.new(errors) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# 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.) end super end |