Revision 323a6bb6
Added by Marc Dequènes almost 16 years ago
- ID 323a6bb6e18d7e6a2c2ecd175a44eeb3b7a7bf7c
lib/cyborghood/base.rb | ||
---|---|---|
# + imap
|
||
# - service
|
||
# + dns
|
||
class Error < StandardError
|
||
class CyberError < StandardError
|
||
attr_accessor :severity, :category
|
||
|
||
#include GetTextSupport
|
lib/cyborghood/objects.rb | ||
---|---|---|
|
||
def initialize(name)
|
||
@name = name
|
||
raise "invalid zone name" unless self.is_valid?
|
||
raise CyberError.new(:unrecoverable, "objects/dns", "invalid zone name") unless self.is_valid?
|
||
|
||
# may not exist (if creating a new one)
|
||
begin
|
||
... | ... | |
domain.instance_variable_set("@ldap", l_dom)
|
||
end
|
||
rescue ActiveLdap::Error
|
||
raise Error.new(:unrecoverable, "db/ldap", e.message)
|
||
raise CyberError.new(:unrecoverable, "db/ldap", e.message)
|
||
end
|
||
end
|
||
|
||
... | ... | |
nil
|
||
end
|
||
rescue ActiveLdap::Error => e
|
||
raise Error.new(:unrecoverable, "db/ldap", e.message)
|
||
raise CyberError.new(:unrecoverable, "db/ldap", e.message)
|
||
end
|
||
|
||
def __getobj__
|
Also available in: Unified diff
[evol] renamed custom exception and converted an old remaining exception