Exception: ActiveLdap::DistinguishedNameInvalid

Inherits:
Error
  • Object
show all
Defined in:
lib/active_ldap/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from GetTextSupport

included

Constructor Details

#initialize(dn, reason = nil) ⇒ DistinguishedNameInvalid

Returns a new instance of DistinguishedNameInvalid.



125
126
127
128
129
130
131
132
133
134
# File 'lib/active_ldap/base.rb', line 125

def initialize(dn, reason=nil)
  @dn = dn
  @reason = reason
  if @reason
    message = _("%s is invalid distinguished name (DN): %s") % [@dn, @reason]
  else
    message = _("%s is invalid distinguished name (DN)") % @dn
  end
  super(message)
end

Instance Attribute Details

#dnObject (readonly)

Returns the value of attribute dn.



124
125
126
# File 'lib/active_ldap/base.rb', line 124

def dn
  @dn
end

#reasonObject (readonly)

Returns the value of attribute reason.



124
125
126
# File 'lib/active_ldap/base.rb', line 124

def reason
  @reason
end